in reply to displaying output at the correct moment

The way you're doing it now will be very dependant on the client. I've noticed IE usually renders the page as it comes in and moves stuff around if necessary. Netscape/Mozilla like to wait until all the HTML has been downloaded.

Also, make sure you shut off buffered output, like this:

$| = undef;

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: displaying output at the correct moment
by shemp (Deacon) on Jun 23, 2003 at 16:44 UTC
    Im not familiar with setting
    $| = undef
    My understanding was that there are only 2 buffering behaviours, and they are based on the truth value of $|
    So, $| = undef would evaluate to false, the same as the default value of $| = 0
    If $| is true, the output buffer is flushed after each output operation (print, printf, write). If $| is false, block buffereing occurs.
    What am i missing?

    Update:fixed a minor typo - i had $\ in place of $| in one place.

      Oops, you're right. I should have said $| = 1;.

      ----
      I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
      -- Schemer

      Note: All code is untested, unless otherwise stated