in reply to Sorting - lower to upper
You can not have a sorted hash, but you can sort it's keys before use
foreach ( sort { ord($a) <=> ord($b) } keys %hash ) { print "$_ => $hash{$_}\n" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting - lower to upper
by shemp (Deacon) on Jul 15, 2004 at 16:32 UTC | |
by Joost (Canon) on Jul 15, 2004 at 16:37 UTC | |
|
Re^2: Sorting - lower to upper
by joule (Acolyte) on Jul 15, 2004 at 17:07 UTC |