# Copyright 2009 Chirag Shah # Script to read a text file and output one word per line. # Usage: ./tokenize.pl < #!/usr/bin/perl while ($line = ) { chop($line); @entry = split(/ /, $line); $i = 0; while ($entry[$i]) { print "$entry[$i]\n"; $i++; } }