CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Show before timer: Edit Log



fds
Novice

Apr 9, 2012, 11:11 AM


Views: 8296
Show before timer

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?

Code
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)


Edit Log:
Post edited by fds (Novice) on Apr 9, 2012, 11:49 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives