http://www.perlmonks.org?node_id=1075166


in reply to Re: How do I keep the first key in a sorted hash?
in thread How do I keep the first key in a sorted hash?

You can even do away with the intermediate array variable:

my $min = ( sort { $a <=> $b } keys %hash )[ 0 ];