in reply to Sorting - lower to upper
edit: %hash{$_} -> $hash{$_}my @keys = sort keys %hash; # adapt to your needs here. for (@keys) { print "$_ => $hash{$_}\n"; }
edit2: This seems to me reasonably efficient:
my @keys = map { tr/a-zA-Z/A-Za-z/; $_ } sort map { tr/a-zA-Z/A-Za-z/; + $_ } keys %hash;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re^2: Sorting - lower to upper
by merlyn (Sage) on Jul 15, 2004 at 16:45 UTC |