in reply to unix->dos & dos->unix
perl -p -e 's/\r$//' < dosfile.txt > unixfile.txt [download]
perl -p -e 's/$/\r/' < unixfile.txt > dosfile.txt [download]