in reply to Re^2: Hash sorting
in thread Hash sorting
however I need to print both the key names and values
Then print both :)
foreach my $key (sort keys %hash) { print "$key : $hash{$key}\n"; }
Update: typo fixed. Thanks to johngg for pointing it out.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Hash sorting
by johngg (Canon) on May 15, 2006 at 08:42 UTC |