in reply to Re: Sorting - lower to upper
in thread Sorting - lower to upper

Your comparison is backwards, the OP wants the lowercase first so you need:
foreach ( sort { ord($b) <=> ord($a) } keys %hash ) { print "$_ => $hash{$_}\n" }
Kudos though, much more elegant than the solution i posted!

Replies are listed 'Best First'.
Re^3: Sorting - lower to upper
by Joost (Canon) on Jul 15, 2004 at 16:37 UTC