perl -i.bak -ne '(tr/\r//d)' test.dat #### perl -i.bak -pe '(tr/\r//d)' test.dat