On Mon, 22 Jul 2002 10:40:29 +0300, [EMAIL PROTECTED] (Octavian Rasnita) wrote:
>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? If you want a nice demo of the buffering problem, run this: ################################################### #!/usr/bin/perl #without a newline, it won't print #until the buffer is 2k #$|=1; # try it with and without this line commented :-) while (1){ print 'aaaaaa'; select(undef,undef,undef,.03); } #################################################### -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]