http://www.perlmonks.org?node_id=470407


in reply to Favourite One-liners?

This is one I use regularly
perl -pi -e 's/\r//' filename