|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^2: printing largest hash valueby tomhukins (Curate) |
| on Feb 22, 2005 at 09:40 UTC ( #433299=note: print w/ replies, xml ) | Need Help?? |
|
Avoid rearranging the elements in an array you've just sorted. Instead of reverse sort { $b <=> $a } keys %hash, write sort { $a <=> $b } keys %hash. The second approach reads more clearly and runs more quickly.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||