All pastes #512628 Raw Edit

Miscellany

public text v1 · immutable
#512628 ·published 2007-05-26 23:44 UTC
rendered paste body
#!/usr/bin/perl
#-w omited for asthetical purposes
use strict;
open (FILE, $ARGV[0]);
my %words;
foreach (<FILE>){
while (/(\w+)/){
if ($words{$1}){
$words{$1} += 1;}
else{$words{$1} = 1;}
}}
foreach (keys %words){
print "$_\: $words{$_}\n";
}