in reply to Re: how to count the no of repeats in a string
in thread how to count the no of repeats in a string
can be simplified toif ($seen{$_}) { $seen{$_} += 1; } else { $seen{$_} = 1; }
$seen{$_}++;
Your sort is also useless since hashes are unordered.
|
|---|