http://qs321.pair.com?node_id=433299


in reply to Re: printing largest hash value
in thread printing largest hash value

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.