note
Utilitarian
Assuming you mean to count the number of occurrences of the same value for different keys in a hash (<c>%names</c> in the example below)
<c>
...
my %name_count;
for my $name (values %names){
$name_count{$name}++;
}
for my $name (sort {$name_count{$a}<=>$name_count{$b}} keys %name_count){
print "$name occurs $name_count{$name} times in the \%names hash\n";
}
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-681898">
<c>print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."</c>
</div></div>
1116054
1116054