in reply to Count duplicates in array.

Use a hash....
my %hash; $hash{$_}++ foreach (@array); print "$_: $hash{$_} " foreach (sort {$hash{$a} <=> $hash{$b}} keys %h +ash);
I'd have looked up a reference or two, but it's quicker to type in the code :)

rdfield