in reply to dos2unix equivalent in Windows
perl -pe1 infile > outfile [download]
In place:
perl -i.bk -pe1 file [download]
Portable program:
$/ = "\n"; $\ = "\r\n"; while (<>) { chomp; print; } [download]