for my $key ( sort keys %hash ) { print "Current key is\t$key\n"; my $xcount = "@{ $hash{ $key } }" =~ tr/X//; my $totalcount = @{ $hash{ $key } }; print "$k\t$totalcount\t$xcount\n"; }
In reply to Re: Count values in a hash
by jwkrahn
in thread Count values in a hash
by sophix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |