in reply to dos2unix equivalent in Windows

perl -pe1 infile > outfile

In place:

perl -i.bk -pe1 file

Portable program:

$/ = "\n"; $\ = "\r\n"; while (<>) { chomp; print; }