gauravs has asked for the wisdom of the Perl Monks concerning the following question:

I want to run dos2unix equivalent for windows to remove line endings. I tried almost all the options on windows but it didn't help. I tried unix equivalents but no use. Thanks, Gaurav

Replies are listed 'Best First'.
Re: dos2unix equivalent in Windows
by ikegami (Patriarch) on Apr 29, 2009 at 01:32 UTC
    perl -pe1 infile > outfile

    In place:

    perl -i.bk -pe1 file

    Portable program:

    $/ = "\n"; $\ = "\r\n"; while (<>) { chomp; print; }
Re: dos2unix equivalent in Windows
by spx2 (Deacon) on Apr 29, 2009 at 13:39 UTC