Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Compare hash !

by ikegami (Patriarch)
on Nov 18, 2010 at 23:14 UTC ( [id://872377]=note: print w/replies, xml ) Need Help??


in reply to Compare hash !

[ I moved your post to Seekers of Perl Wisdom. Cool Uses for Perl is for showing off interesting or useful pieces of Perl code ]

how to compare them

Compare what to what?

how to [...] print name of the biggest

use strict; use warnings; use feature qw( say ); use List::Util qw( reduce ); my %students = ( ... ); my $highest = reduce { $students{$a} >= $students{$b} ? $a : $b } keys(%students); say $students{$highest};

List::Util, say

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://872377]
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-03-29 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found