You probably meant:
% perl -0015 -pe chomp infile > outfile
# or even better
% perl -0015 -pe 's{^\cZ$}{}; chomp' infile > outfile
# deparse shows that -l0 cannot work
% stephan@ape (/c/cygvar/tmp) %
% perl -MO=Deparse -l0 -0015 -pe1
BEGIN { $/ = "\r"; $\ = "\000"; }
LINE: while (defined($_ = <ARGV>)) {
chomp $_;
'???';
}
continue {
print $_;
}
-e syntax OK
# checking
% stephan@ape (/c/cygvar/tmp) %
% echo abc def | xargs -n1 | perl -lpe '$_.="\cM"' | cat -evnt
1 abc^M$
2 def^M$
% stephan@ape (/c/cygvar/tmp) %
% echo abc def | xargs -n1 | perl -lpe '$_.="\cM"' | perl -0015 -pe ch
+omp | cat -evnt
1 abc$
2 def$
cheers
--steph
Server Error (Error ID 7544608c2133076)An error has occurred. The site administrators
have been notified of the problem and will likely
soon fix it. We thank you, for you're patients.