Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open $file, 'test.txt';
- map {$freq{lc $_}++} split for <$file>;
- for $word (sort {$freq{$b} <=> $freq{$a}} keys %freq) {
- print "$word: $freq{$word}\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement