in reply to Re: Sending html content to the browser as the script runs
in thread Sending html content to the browser as the script runs
#!/usr/local/bin/perl #script: nph-test_script_jmj.cgi use strict; use CGI qw(:standard -nph); $| = 1; ################### MAIN ########## CGI->nph(1); my $cgi = CGI->new(); print $cgi->header(-nph=>1); html_1(); print "my second is: " . mytime() . "<br>\n"; sleep 3; print "my second is: " . mytime() . "<br>\n"; html_2(); ############################################ sub html_1 { print "\n"; print "processing file<br>\n"; } sub html_2 { print "\n"; print "done processing file<br>\n"; } sub mytime { my ($sec) = localtime; return $sec; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sending html content to the browser as the script runs
by jdtoronto (Prior) on Aug 03, 2006 at 12:55 UTC | |
by perljunkymunky (Initiate) on Aug 03, 2006 at 16:18 UTC |