while (<>) { chomp; if (eof) {print "$_\n"} else {print "$_\t"} }