The -n command line option doesn't print anything to the output file. Try using -p instead.
Update: And with the end of file processing added:
perl -i~ -pe 'tr/\r//d; $_ .="\n" if eof' file_name
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Adding \n (new line) and removing \r in a file
by davorg
in thread Adding \n (new line) and removing \r in a file
by mantra2006
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |