Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: printing largest hash value

by tomhukins (Curate)
on Feb 22, 2005 at 09:40 UTC ( #433299=note: print w/ replies, xml ) Need Help??

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.

Comment on Re^2: printing largest hash value
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433299]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2014-11-01 13:28 GMT
Find Nodes?
    Voting Booth?

    If a safe, affordable anti-ageing treatment that extended life indefinitely were to become available, would you take it?

    Results (4 votes), past polls