in reply to Progress Bar controlled via Perl
While perhaps not as robust as merlyn's method, there's a much simpler way to do it. Just turn on autoflush ($| = 1) and have your script start outputting to the browser right away. Then update your progress bar every so often while your script runs. Here's a simple example:
#!perl -w use strict; use CGI; $| = 1; # turn on autoflush print CGI->header; print "Progress: "; for (1..10) { print '.'; sleep 2; } print "\n<br><br>Done!";
-b
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Progress Bar controlled via Perl
by edan (Curate) on Aug 22, 2004 at 13:31 UTC |