Sponsored Content
Top Forums Shell Programming and Scripting getting data list into a hash array Post 48499 by topcat8 on Tuesday 9th of March 2004 11:02:35 AM
Old 03-09-2004
wow, that's really good.

Thanks, I understand it more now. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Hash within array, within hash, within array...

I have a little problem. To keep a configuration simple, I've exceeded my perl knowledge. :-) I've worked with multi-dimentional arrays before, but this one has me beat: @info = ( { 'defval' => 'abc' 'stats' = ( { 'name' => 'a', }, { 'name' =>... (1 Reply)
Discussion started by: jsmoriss
1 Replies

2. Shell Programming and Scripting

hash,array and perl

Hi,i have a code fragment below. %tag = (); #line 1 $tag{'info'} = $datastring; #line 2 $resp = $ua->request( #$ua is a user agent POST 'http://10.2.3.0' , Content_Type => application/x-www-form-urlencoded Content => #line 3 I am not sure of what the code... (3 Replies)
Discussion started by: new2ss
3 Replies

3. Shell Programming and Scripting

Read csv into Hash array?

Hi all experts, May I know how to read a csv file and read the content in a hash in PERL? Currently, I hard-coded and defined it in my code. I wanna know how to make up the %mymap hash thru reading the cfg.txt ==== csv file(cfg.txt): 888,444 999,333 === #!/usr/bin/perl my... (1 Reply)
Discussion started by: kinmak
1 Replies

4. Shell Programming and Scripting

Print Entire hash list (hash of hashes)

I have a script with dynamic hash of hashes , and I want to print the entire hash (with all other hashes). Itried to do it recursively by checking if the current key is a hash and if yes call the current function again with refference to the sub hash. Most of the printing seems to be OK but in... (1 Reply)
Discussion started by: Alalush
1 Replies

5. Shell Programming and Scripting

Perl Hash:Can not keep hash data in the same order that it was inserted

Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below. #!/usr/bin/perl use warnings; use Tie::IxHash; use strict; tie (my %programs, "Tie::IxHash"); while (my $line = <DATA>) { chomp $line; my(... (1 Reply)
Discussion started by: jgfcoimbra
1 Replies

6. Web Development

Intersection and union of array by hash

Hi, A piece of script from Perl-cookbook I do not understand, and post here for explanation. The purpose is to find the element in either array (union), and in both array (intersection). Thank you in advance. @a=qw(1 3 5 6 7 8); @b=qw(2 3 5 7 9); foreach $e (@a, @b) {$union{$e}++ &&... (3 Replies)
Discussion started by: yifangt
3 Replies

7. Shell Programming and Scripting

perl - need help with 2 arrays to hash or 2d array?

I have 2 arrays: @array1 outputs the following: 1 1 1 2 @array2 outputs the following A B C D (2 Replies)
Discussion started by: streetfighter2
2 Replies

8. Shell Programming and Scripting

perl Can't coerce array into hash at

Hi guys I have this part of a perl script that returns and odd error if ($args{software}) { print " @DISTFILE_GROUPS $output->{distfile_groups}->{ get_rdist_groups}\n"; and the error is Can't coerce array into hash at i've never seed this error before, any ideas thanks... (0 Replies)
Discussion started by: ab52
0 Replies

9. Shell Programming and Scripting

array of hash - perl

How do I get the unique hashes from an array of hashes? @ar1 = ( {a=>1,b=>2}, {c=>3,d=>4},{a=>1,b=>2});I need : @ar2 = ( {a=>1,b=>2}, {c=>3,d=>4});Thanks. (2 Replies)
Discussion started by: shellwell
2 Replies

10. Programming

Perl Array within an hash

Hi All I have been using a curl code to output an hash that looks like this $VAR1 = { 'data'... (5 Replies)
Discussion started by: ab52
5 Replies
Module::CoreList(3pm)					 Perl Programmers Reference Guide				     Module::CoreList(3pm)

NAME
Module::CoreList - what modules shipped with versions of perl SYNOPSIS
use Module::CoreList; print $Module::CoreList::version{5.00503}{CPAN}; # prints 1.48 print Module::CoreList->first_release('File::Spec'); # prints 5.00405 print Module::CoreList->first_release_by_date('File::Spec'); # prints 5.005 print Module::CoreList->first_release('File::Spec', 0.82); # prints 5.006001 print join ', ', Module::CoreList->find_modules(qr/Data/); # prints 'Data::Dumper' print join ', ', Module::CoreList->find_modules(qr/test::h.*::.*s/i, 5.008008); # prints 'Test::Harness::Assert, Test::Harness::Straps' print join ", ", @{ $Module::CoreList::families{5.005} }; # prints "5.005, 5.00503, 5.00504" DESCRIPTION
Module::CoreList provides information on which core and dual-life modules shipped with each version of perl. It provides a number of mechanisms for querying this information. There is a utility called corelist provided with this module which is a convenient way of querying from the command-line. There is a functional programming API available for programmers to query information. Programmers may also query the contained hash structures to find relevant information. FUNCTIONS API
These are the functions that are available, they may either be called as functions or class methods: Module::CoreList::first_release('File::Spec'); # as a function Module::CoreList->first_release('File::Spec'); # class method "first_release( MODULE )" Behaviour since version 2.11 Requires a MODULE name as an argument, returns the perl version when that module first appeared in core as ordered by perl version number or undef ( in scalar context ) or an empty list ( in list context ) if that module is not in core. "first_release_by_date( MODULE )" Requires a MODULE name as an argument, returns the perl version when that module first appeared in core as ordered by release date or undef ( in scalar context ) or an empty list ( in list context ) if that module is not in core. "find_modules( REGEX, [ LIST OF PERLS ] )" Takes a regex as an argument, returns a list of modules that match the regex given. If only a regex is provided applies to all modules in all perl versions. Optionally you may provide a list of perl versions to limit the regex search. "find_version( PERL_VERSION )" Takes a perl version as an argument. Returns that perl version if it exists or "undef" otherwise. "is_deprecated( MODULE, PERL_VERSION )" Available in version 2.22 and above. Returns true if MODULE is marked as deprecated in PERL_VERSION. If PERL_VERSION is omitted, it defaults to the current version of Perl. "removed_from( MODULE )" Available in version 2.32 and above Takes a module name as an argument, returns the first perl version where that module was removed from core. Returns undef if the given module was never in core or remains in core. "removed_from_by_date( MODULE )" Available in version 2.32 and above Takes a module name as an argument, returns the first perl version by release date where that module was removed from core. Returns undef if the given module was never in core or remains in core. "changes_between( PERL_VERSION, PERL_VERSION )" Available in version 2.66 and above. Given two perl versions, this returns a list of pairs describing the changes in core module content betweent hem. The list is suitable for storing in a hash. The keys are library names and the values are hashrefs. Each hashref has an entry for one or both of "left" and "right", giving the versions of the library in each of the left and right perl distributions. For example, it might return these data (among others) for the the difference between 5.008000 and 5.008001: 'Pod::ParseLink' => { left => '1.05', right => '1.06' }, 'Pod::ParseUtils' => { left => '0.22', right => '0.3' }, 'Pod::Perldoc' => { right => '3.10' }, 'Pod::Perldoc::BaseTo' => { right => undef }, This shows us two libraries being updated and two being added, one of which has an undefined version in the right-hand side version. DATA STRUCTURES
These are the hash data structures that are available: %Module::CoreList::version A hash of hashes that is keyed on perl version as indicated in $]. The second level hash is module => version pairs. Note, it is possible for the version of a module to be unspecified, whereby the value is "undef", so use "exists $version{$foo}{$bar}" if that's what you're testing for. Starting with 2.10, the special module name "Unicode" refers to the version of the Unicode Character Database bundled with Perl. %Module::CoreList::released Keyed on perl version this contains ISO formatted versions of the release dates, as gleaned from perlhist. %Module::CoreList::families New, in 1.96, a hash that clusters known perl releases by their major versions. %Module::CoreList::deprecated A hash of hashes keyed on perl version and on module name. If a module is defined it indicates that that module is deprecated in that perl version and is scheduled for removal from core at some future point. %Module::CoreList::upstream A hash that contains information on where patches should be directed for each core module. UPSTREAM indicates where patches should go. "undef" implies that this hasn't been discussed for the module at hand. "blead" indicates that the copy of the module in the blead sources is to be considered canonical, "cpan" means that the module on CPAN is to be patched first. "first-come" means that blead can be patched freely if it is in sync with the latest release on CPAN. %Module::CoreList::bug_tracker A hash that contains information on the appropriate bug tracker for each core module. BUGS is an email or url to post bug reports. For modules with UPSTREAM => 'blead', use perl5-porters@perl.org. rt.cpan.org appears to automatically provide a URL for CPAN modules; any value given here overrides the default: http://rt.cpan.org/Public/Dist/Display.html?Name=$ModuleName CAVEATS
Module::CoreList currently covers the 5.000, 5.001, 5.002, 5.003_07, 5.004, 5.004_05, 5.005, 5.005_03, 5.005_04, 5.6.0, 5.6.1, 5.6.2, 5.7.3, 5.8.0, 5.8.1, 5.8.2, 5.8.3, 5.8.4, 5.8.5, 5.8.6, 5.8.7, 5.8.8, 5.8.9, 5.9.0, 5.9.1, 5.9.2, 5.9.3, 5.9.4, 5.9.5, 5.10.0, 5.10.1, 5.11.0, 5.11.1, 5.11.2, 5.11.3, 5.11.4, 5.11.5, 5.12.0, 5.12.1, 5.12.2, 5.12.3, 5.12.4, 5.13.0, 5.13.1, 5.13.2, 5.13.3, 5.13.4, 5.13.5, 5.13.6, 5.13.7, 5.13.8, 5.13.9, 5.13.10, 5.13.11, 5.14.0, 5.14.1, 5.14.2, 5.15.0, 5.15.1, 5.15.2, 5.15.3, 5.15.4, 5.15.5, 5.15.6, 5.15.7, 5.15.8, 5.15.9, 5.16.0, 5.17.0, 5.17.1, 5.17.2, 5.17.3, 5.17.4 and 5.17.5 releases of perl. HISTORY
Moved to Changes file. AUTHOR
Richard Clamp <richardc@unixbeard.net> Currently maintained by the perl 5 porters <perl5-porters@perl.org>. LICENSE
Copyright (C) 2002-2009 Richard Clamp. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
corelist, Module::Info, perl, <http://perlpunks.de/corelist> perl v5.16.3 2013-03-04 Module::CoreList(3pm)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy