Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Max numbers of element in the values of an HoH

by Ido (Hermit)
on Dec 16, 2005 at 14:52 UTC ( [id://517254]=note: print w/replies, xml ) Need Help??


in reply to Max numbers of element in the values of an HoH

If you only need the maximum (and you're not golfing), I see no reason to sort. You could use something like:
my $max=0; for(map values %$_,values %result){ my $n=split; $max=$n if $n>$max; } print $max;
HTH

Replies are listed 'Best First'.
Re^2: Max numbers of element in the values of an HoH
by secret (Beadle) on Dec 16, 2005 at 16:32 UTC
    neat, since it doesn't need the @list nor the @tmp either !
    thx

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-18 00:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found