in reply to Re^2: Removing ^M char AKA dos2unix
in thread Removing ^M char AKA dos2unix

perl -MExtUtils::Command -e dos2unix file1 file2 dir1
Or better still, install dos2unix utility