while (<>) { chomp; tr{\n\t}{\r }; $_ = substr($_ . $pad, 0, $wide); print "$_\r"; } if(!$keep) {print "$pad\r";} else {print "\n";} exit(0);