Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Find number of unique values in hash

by AnomalousMonk (Archbishop)
on Jan 19, 2010 at 23:26 UTC ( [id://818319]=note: print w/replies, xml ) Need Help??


in reply to Re: Find number of unique values in hash
in thread Find number of unique values in hash

rethaew want[s] to do it "without looping through each hash and counting." No, I don't think that's possible.

I agree. Even a solution like
    my $age12 = grep $_->{age} == 12, values %hoh;
implicitly loops through the hash. rethaew will have to wait for the arrival of the personal desktop quantum computer to solve the problem without looping.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-19 00:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found