in reply to
Removing Control Characters
If you have some files from Macs as well as DOS:
perl -pi.bak -e 's/\r\n?/\n/g' file1 file2
[download]
The point being that this will correctly convert both \r\n and \r line endings.
Comment on
Re (tilly) 1: Removing Control Characters
Download
Code
In Section
Seekers of Perl Wisdom