In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Slaven Rezic) wrote:

Could this be made even more generic, but translating to \n instead of \012?

> Or use source filters:
> 
> package Filter::Any2Unix;

Any2Native?

> use Filter::Util::Call;
> sub import {
>     if ($^O ne 'MacOS') {

#?

>       filter_add(sub {
>                      my($status) = filter_read();
>                      if ($status > 0) {
>                          s/\015\012|\015|\012/\012/g;

/\n/g ?

>                      }
>                  }
>                 );
>     }

#?

> }
> 
> and then call the script with 
> 
>    perl -MFilter::Any2Unix script.pl
> 
> or embed "use Filter::Any2Unix" into the script.

That shouldn't work.  By the time you get to it in the script, if you have a 
#! line, then the entire script is one long comment, and the use() line 
won't ever be executed.

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/

Reply via email to