in reply to using hash to find frequency count
Aside from the question of how suitable the items in @list are for your purposes, the logic in read_line's loop doesn't make sense to me. I think that what you want is:
foreach my $word (@list) { print $word, $/ unless $hash{ lc $word }++; $count = $hash{ lc $word }; if ($count > $maxcount) { $maxcount = $count; $find = $word; } }
the lowliest monk
|
|---|