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.
In reply to Re^2: Find number of unique values in hash
by AnomalousMonk
in thread Find number of unique values in hash
by rethaew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |