in reply to A delay effect...

Hi unb0rn,

How do I make the autoflusing feature active?

kiat

Replies are listed 'Best First'.
Re: Re: A delay effect...
by unb0rn (Scribe) on Dec 30, 2001 at 21:01 UTC
    To set the autoflush, just set the magic variable $| to 1. I used $|++ to increment it, because it's default value is 0, or autoflush turned off.

    Autoflush means that Perl sends the output of print's in time they are called. When it's off, Perl puts the print's output in a temporary buffer, and sends the print's output in blocks to the screen/client/etc.

    . Just another not-perfect-but-trying-to-be-legible answer 8-)
Re: Re: A delay effect...
by simon.proctor (Vicar) on Dec 30, 2001 at 20:01 UTC
    Well you can use standard IO modules to do it in an OO fashion but the simplest (and most common in old scripts I would argue) is

    $|++;


    This increments the $| variable. To learn more take a look at the perlvar man page.