in reply to RE: Re: Order of output when switching filehandles
in thread Order of output when switching filehandles

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.
  • Comment on RE: RE: Re: Order of output when switching filehandles

Replies are listed 'Best First'.
RE: RE: RE: Re: Order of output when switching filehandles
by Cirollo (Friar) on Aug 14, 2000 at 23:12 UTC
    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.