Removing ^M characters with Perl 10 June, 2011 By gerald Leave a Comment perl -pi -e 's/\r//g' <file_name> 1 perl -pi -e 's/\r//g' <file_name>