http://qs1969.pair.com?node_id=268677


in reply to Re: Sorting hash keys according to different criteria
in thread Sorting hash keys according to different criteria

Hi, Can I ask why this only prints one item in the hash array?
my %people; %people =( { name => "fred", age => 31, }, { name => "bill", age => 32, }); my $length = keys %people ; print "$length\n"; foreach my $key (sort keys %people) { print("$people{$key}{'name'}: $people{$key}{'age'}\n"); }

Code tags - dvergin 2003-06-24