On Sep 23, Dave Adams said:

Sometimes I get perl scripts that were developed on windows and then
brought over to UNIX and the scripts contain all the pesky
metacharacters of ^M and excessive blank lines.

Does anyone have a simple script to clean these files up or suggestions?

Many unix platforms come with a program called 'dos2unix' or something similar. You don't really need Perl to do this. A simple 'tr' command will work:

  tr -d '\r' '' < file.in > file.out

--
Jeff "japhy" Pinyan        %  How can we ever be the sold short or
RPI Acacia Brother #734    %  the cheated, we who for every service
http://www.perlmonks.org/  %  have long ago been overpaid?
http://princeton.pm.org/   %    -- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to