my $matches = grep { $variable eq $_ } values %hash; That has $matches assigned to the number of hash values which match. String equality is tested; use '==' if you want a numeric match.
After Compline,
Zaxo
In reply to Re: Iterating over hash contents?
by Zaxo
in thread Iterating over hash contents?
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |