in reply to How to remove ^M from a file

perl -pi -e 's/\r//g' filename

-Matt