------------------------------------------------ On Mon, 31 Mar 2003 11:31:34 +0100, "Rob Dixon" <[EMAIL PROTECTED]> wrote:
> Sudarshan Raghavan wrote: > > > > Both STDERR and STDOUT are line buffered, when a "\n" is seen > > the contents of the buffer is flushed. Turning on autoflush is superfluous > > in this case. Try this instead :-) > > > > #!/usr/local/bin/perl > > use strict; > > use warnings; > > > > select (STDERR); > > $| = 1; > > print STDOUT "STDOUT"; > > print STDERR "STDERR"; > > As I pointed out, precisely how the streams are handled is > platform-dependent. On my Win2KPro system this > > print STDERR "STDERR\n"; > print STDOUT "STDOUT\n"; > > outputs this > > STDOUT > STDERR > > so they are clearly not line-buffered. Whether it is generally > true that they are on *nix systems I cannot say. > But then you didn't adjust for your line ending? The line ending is platform dependent, if you use the correct line ending does it then appear line buffered? Or does the "\n" correct itself, I can't remember this early on a monday... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]