Removing ^M from your files fast and with little effort
Doesnt it just drive you nuts to edit a file in Windows, and have a ^M at the end of each line ? Well with the following information, we can remove that.
Do the following :
'perl -i.bak -npe 's/\r\n/\n/g' <file>'
where <file> is the name of the file you want to "clean".
The original file is copied to <file>.bak...
Thats all there is to it... nothing fancy.
Article By: Rocky