Michael
Thanks a lot. When you visit Brasil, please call me to drink a "caipiroska".
Cordialy.
Bisotto
----- Original Message -----
From: "Michael G Schwern via RT" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 28, 2005 2:08 PM
Subject: Re: [perl #36414] Is a bug ?
On Tue, Jun 28, 2005 at 03:31:12PM -0000, LOGGOS TI wrote:
I?m using Perl 5.8.4.810 and have long time display response when trying
to get feedback (prints):
For ex.:
Foreach $Tmp (@Arr){
# my code
print "\."; # a kind of feedback processsing
Foreach $Tmp (@Arr){
# my code
}
}
Please is it a bug ? Any documentation may help me to treat this problem
?
This is not a bug. You have run into filehandle buffering in which the
print is held in a buffer and not displayed on the screen until the buffer
is full or dumped. In the case of printing to STDOUT it is dumped when it
sees a newline. You can turn off buffering using the $| variable. See
perlvar for details.
A gentle tutorial on buffering and how to deal with it in Perl can be
found
here:
http://perl.plover.com/FAQs/Buffering.html
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern
You are wicked and wrong to have broken inside and peeked at the
implementation and then relied upon it.
-- tchrist in <[EMAIL PROTECTED]>