> I was given the following Perl script by a colleague to convert MS-DOS
> to UNIX. It looks easily modifiable to do the reverse and I'm sure it
> can be readily converted to work across a directory of files on the
> command line.
>
> I'm not a Perl programmer (thank heavens to Betsy!), so this is
> provided as is!
>
> #!/usr/bin/perl
>
> undef $/;  # read entire file
> $_ = <>;
> s/\015\012/\n/g;  # translate MS-DOS CRLF to newline
> s/\015/\n/g;      # translate ASCII CR to newline
> s/\012/\n/g;      # translate ASCII NL to newline
> print;
>
>
> Not sure if that helps.

Thanks, Daniel.

Unfortunately, I don't know anything about perl, so I don't understand what
this script is doing, and how to modify it.

Thanks anyway!
-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]





Reply via email to