in reply to Re^2: Test if STDOUT is attached to console or shell redirected filehandle
in thread Test if STDOUT is attached to console or shell redirected filehandle

I think thats probably a Windows thing; when I call perl from the pipe first, your code works perfectly.
fyi, I'm using ActiveState v5.8.8.822
type highlight.pl | perl highlight.pl
  • Comment on Re^3: Test if STDOUT is attached to console or shell redirected filehandle
  • Download Code

Replies are listed 'Best First'.
Re^4: Test if STDOUT is attached to console or shell redirected filehandle
by liverpole (Monsignor) on Sep 09, 2009 at 17:10 UTC
    Interesting!

    In Windows (ActiveState v5.10.0) doing it this way "works":

    type highlight.pl | perl highlight.pl

    Doing it this way does not:

    type highlight.pl | highlight.pl

    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/