Check out the Pastebin Gadgets Shop. We have thousands of fun, geeky & affordable gadgets on sale :-)Want more features on Pastebin? Sign Up, it's FREE!


By: a guest on Mar 1st, 2009  |  syntax: Perl  |  size: 0.13 KB  |  views: 99  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. open $file, 'test.txt';
  2. map {$freq{lc $_}++} split for <$file>;
  3. say "$_: $freq{$_}" for sort {$freq{$b} <=> $freq{$a}} keys %freq;
clone this paste RAW Paste Data