in reply to Order of output when switching filehandles

I'm not sure, but you should close ( TEE ) when you're done with it.

"cRaZy is co01, but sometimes cRaZy is cRaZy".
                                                      - crazyinsomniac

  • Comment on (crazyinsomniac) Re: Order of output when switching filehandles

Replies are listed 'Best First'.
RE: Re: Order of output when switching filehandles
by Cirollo (Friar) on Aug 14, 2000 at 22:54 UTC
    Erk. That seems to have fixed it. Thanks.

    Just out of curiosity, can any of you gurus explain why that happens?

      I may be smoking something, but usually $| = 1; doesn't completely disable buffering, just most of Perl's buffering. You still need to close it to force the OS buffer to be flushed.
        As I understand it, when $| = 0, then buffering is enabled, and I think how it works depends on whether you are outputting to a terminal. $| = 1 doesn't completely disable buffering but turns on 'command buffering', so each time you do a 'print' or whatever, everything from that command is printed asap.