Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: largest number inside array/hash

by DamnDirtyApe (Curate)
on Apr 06, 2004 at 18:38 UTC ( #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
Node Status?
node history
Node Type: note [id://343070]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2020-05-25 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (143 votes). Check out past polls.

    Notices?