in reply to Progress bar with (i)threads

This is a perl script running as a cgi script, right?

Other people have already mentioned setting $| = 1 to stop perl buffering the output.

You also need to stop your web server buffering it. Ensure that your script’s filename starts nph-. (NPH stands for non-parsed headers.) You will also need to ensure that the http headers your script writes are terminated by a CRLF, as the web server will no longer do that for you.

Replies are listed 'Best First'.
Re^2: Progress bar with (i)threads (Buffering)
by PockMonk (Beadle) on Dec 08, 2006 at 14:36 UTC
    This is a Perl-language CGI script, yes. Its actually for one of several bots I'm writing to help out with wikipedia, if anyone's interested :-)

    The buffering was causing a problem - it wasn't something I'd come across before so I didn't really know where to look for the cause of the problem - since it was the first time I'd used threads I assumed that I must be doing something wrong with the threads code it seems my threads code was actually ok.

    Thanks for the response!