
fds
Novice
Apr 9, 2012, 11:11 AM
Post #1 of 5
(7703 views)
|
|
Show before timer
|
Can't Post
|
|
Hi, this may sound a bit trivial, but I have a timer and want some sort of note that it is running. I have tried as shown, but the "Processing" bit will not show until it is all done. The "Finished" bit is working like it should. It works on a Refresh, but that's not what I want to happen. How do I make the "Processing" show first?
use strict; use warnings; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); print "Content-type: text/html\n\n"; tiMer(); sub tiMer { print qq ~Processing - want to show before and during timer run (but it doesn't)~; dodelay(); print qq ~<br><br>Finished - this shows okay~; exit(0); } sub dodelay { $| = 1; my $sec = time(); while (time()-$sec < 3){} } ---------------------------------------------- fdsaadsfdsaf
(This post was edited by Ted on Apr 9, 2012, 11:49 AM)
|