print "$a File Having CtrlM and Removed \n"; `perl -pi 's/\r\n/\n/' $a`; [download]
In reply to Remove ^M using script by Anonymous Monk