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


in reply to Re: How to retrieve the worst value?
in thread How to retrieve the worst value?

Hi,

Why create an extra hash?

print +(sort { $a <=> $b } values %hash)[-1];
The sort by default sorts alfanumeric, so in your case 30 is better than 4.

---------------------------
Dr. Mark Ceulemans
Senior Consultant
BMC, Belgium