while (defined(my $line = <$in>)) { chomp $line; # Zap trailing "\n" efficiently print $out $line,"\r"; }