in reply to Re: Perl ignores lines with bold characters from a pipe on Windows (source not dest)
in thread Perl ignores lines with bold characters from a pipe on Windows

Probably correct. Unfortunately I have no idea how mycmd might be analyzing its parent process. To my knowledge no relevant environment variables are set either from the shell or from Perl. Mycmd is closed source, so I'm likely at a dead end.

How can I check that Perl isn't setting any environment variables?

  • Comment on Re^2: Perl ignores lines with bold characters from a pipe on Windows (source not dest)

Replies are listed 'Best First'.
Re^3: Perl ignores lines with bold characters from a pipe on Windows (source not dest)
by blazar (Canon) on Mar 03, 2007 at 13:37 UTC
    How can I check that Perl isn't setting any environment variables?

    AFAIK, it doesn't. If you don't, that is. OTOH under *NIX it is possible to detect whether a file descriptor is connected to a tty or not, which is often used to "understand" whether a program's STDOUT is being piped or redirected to a file or not. (This is what e.g. ls(1) does under recent releases of Linux, at least: it acts like ls -1 if you pipe it to something else, and similarly if you set --color=auto it will print coloured output on the terminal, but will disable it when piping or redirecting to a file - in fact the switch is set by default in many distros.) Maybe under windows it's the same. Let me see:

    C:\temp>perl -le "open F, '>F'; print -t *F; print -t *STDOUT" 1