in reply to Count duplicates in array.
my %hash; $hash{$_}++ foreach (@array); print "$_: $hash{$_} " foreach (sort {$hash{$a} <=> $hash{$b}} keys %h +ash); [download]
rdfield