#!/usr/bin/perl # readwrite.pl while ($line = ) { chomp($line); @tokens = split(" ", $line); for $tok (@tokens) { ) print "$tok "; } print "\n"; }