I have used Text::NSP module and have found most frequent collocations in a text, and ended with this:
$filename = "input.txt";
$outfile="output.txt";
open(INPUT,$filename) or die "Can't open file $filename\n";
open( OUTPUT, "> $outfile") or die "$filename: $!";
undef $/; my...