this should work just fine in DOS (note you have to use double quotes for the -e param):
perl -pe "s/\r(?=\n)//" winfile.txt > unixfile.txt
see
perlre for the postive look-ahead
or to do it in-place (see
perlrun):
perl -i.bak -pe "s/\r(?=\n)//" winfile.txt > unixfile.txt
demo batch file:
perl -e "print \"foo\r\nbar\r\nstuff\";" > f.txt
perl -pe "s/(\s)/'['.ord($1).']'/esg" f.txt
REM output: foo[13][10]bar[13][10]stuff
perl -i.bak -pe "s/\r(?=\n)//" f.txt
perl -pe "s/(\s)/'['.ord($1).']'/esg" f.txt
REM output: foo[10]bar[10]stuff