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

Re: largest number inside array/hash

by DamnDirtyApe (Curate)
on Apr 06, 2004 at 18:38 UTC ( [id://343070]=note: print w/replies, xml ) Need Help??


in reply to largest number inside array/hash

my %hash = ( 12 => undef, 18 => undef, 6 => undef, 22 => undef, 28 => undef, 16 => undef ); printf "Max value is %d.$/", ( sort {$b <=> $a} keys %hash )[0];

_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found