Teddy,
    $|=1; is supposed to perl to print to standard out right away instead of buffer 
information.
You see, by default Perl buffers what it is going to print out until the buffer is 
full, then
prints.
    For some reason, when I use $|=1; It seems that the first output to STDOUT is 
buffered, but once
it prints the initial buffered part, everything after that is printed immediately.

Regards,
David


----- Original Message -----
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 22, 2002 1:40 AM
Subject: Buffer output?


Hi all,

I've seen the following line in more Perl scripts and even in some Perl
books, but it wasn't very well explained.

$|=1;       ## Don't buffer output

What does it mean to buffer output?
Which is the difference if the  $| is 0 or 1?

Thank you.

Teddy Center: http://teddy.fcc.ro/
Mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to