Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055600]
[cbeckley]: I have a functioning module I use to spawn sets of commands across multiple servers.
[cbeckley]: It's nascent, and probably looks like baby Perl to the veterans.
[cbeckley]: I have several questions about it's future development. But it seems like a lot of code to put in a sopw.
[cbeckley]: Should I put the module and example calling code in cufp, and then ask questions in sopw?
[haukex]: You can put it in SOPW, but use <readmore> tags

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2017-03-24 15:02 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (304 votes). Check out past polls.