>perl -MO=Deparse -pe"}{$\=$." LINE: while (defined($_ = )) { (); } { $\ = $.; } continue { die "-p destination: $!\n" unless print $_; } -e syntax OK #### >perl -pe"}{$\=$." script.pl 56 >copy script.pl test.txt 1 file(s) copied. >perl -pe"}{$\=$." test.txt 56