good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: sort hash by valueby greywolf (Priest) |
on Mar 20, 2006 at 21:09 UTC ( [id://538051]=note: print w/replies, xml ) | Need Help?? |
The OP alludes to the fact that the hash values are numbers while the keys are strings. He will want to use '<=>' rather than 'cmp' to sort the number values properly.
mr greywolf
In Section
Seekers of Perl Wisdom
|
|