Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: How do I keep the first key in a sorted hash?

by Not_a_Number (Prior)
on Feb 17, 2014 at 12:18 UTC ( #1075166=note: print w/replies, xml ) Need Help??


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 ];

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1075166]
help
Chatterbox?
[marto]: if only Spectre had remained a fictional organisation :P https://www. phoronix.com/scan. php?page=news_item &px=Spectre-V3-V4- Vulnerabilities
[marto]: 'GDPR meats butcher's shop'?
[Discipulus]: ;=P

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-05-22 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?