Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: How to retrieve the worst value?

by mce (Curate)
on Apr 01, 2004 at 14:13 UTC ( #341632=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://341632]
help
Chatterbox?
[LanX]: ... what's next? Donald as John Wayne in "Rio Pig Blood - Bad Hombres must Die" ?
[LanX]: nowadays no idea is too silly to be unlikely...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-08-18 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (301 votes). Check out past polls.

    Notices?