Re: Printing Array of Hashes

2003-12-23 Thread William Martell
Terrific. Thank you. Thank you. Thank you. - Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 23, 2003 4:19 PM Subject: Re: Printing Array of Hashes > William Martell wrote: > > > > Hi J

Re: Printing Array of Hashes

2003-12-23 Thread John W. Krahn
William Martell wrote: > > Hi John, Hello, > I received your code. Thanks. > I would like to know how to check the values of the keys in the hash. I > checked the Perl cookbook and It showed me how to get the key value pairs > and print them, but I am not familiar with populating an array wit

Re: Printing Array of Hashes

2003-12-23 Thread Roberto Álamos Moreno
Hi William, This is very simple. The key function will do the work as in this example: my %hash; my @keys; my @values; $hash{key1} = "value1"; $hash{key2} = "value2"; foreach my $key (keys %hash) { push(@keys,$key); push(@values,$hash{$key}); } After the execution of this script

Printing Array of Hashes

2003-12-23 Thread William Martell
Hi John, I received your code. Thanks. I would like to know how to check the values of the keys in the hash. I checked the Perl cookbook and It showed me how to get the key value pairs and print them, but I am not familiar with populating an array with a hash, or how to dynamically print the va