Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to compare hash values within the same hash?

by Anonymous Monk
on Sep 25, 2013 at 03:11 UTC ( #1055600=note: print w/ replies, xml ) Need Help??


in reply to How to compare hash values within the same hash?

You already have good answers. TIMTOWTDI:

# Frequency of each value. my %freq; $freq{$_}++ for values %hash; # Sort by frequency. my @bucket; @bucket[values %freq] = keys %freq; print "There are $#bucket occurrences of the value $bucket[-1].\n";


Comment on Re: How to compare hash values within the same hash?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (17)
As of 2015-07-07 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls