The simple old way (I'm not sure if the syntax below supercedes it) is:

$|=1;

Assigning any non-false value to $| will turn off buffering.

Ian

On 1/31/03 9:16 PM, "Dan Mills" <[EMAIL PROTECTED]> wrote:

> 
> On Friday, January 31, 2003, at 12:26  PM, Martin Redington wrote:
> 
>> 
>> Try the following:
>> 
>> perl -e 'for($i = 0; $i < 100; $i++){ print STDERR  "$i"; sleep 1 ;
>> print STDERR "\r"}'
>> 
>> (I used STDERR, to avoid buffering of stdout. There is a way to
>> disable this, but I can't recall it off the top of my head).
> 
> iirc, you can turn off the buffering with:
> 
> STDOUT->autoflush (1);
> 
> -Dan
> 
> 

Reply via email to