Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
XP is just a number
 
PerlMonks  

RE: Background Process

by BBQ (Curate)
on Jun 26, 2000 at 01:08 UTC ( [id://19784]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Background Process

I usually just reverse the order of things. Print out the html response, then do whatever it is you need to do. In cases such as sending emails, its not that big of an issue to print out first and send the email later, but I would recommend against this if the user has requested to update a database or do something that would require an error message in case it fails.

This doesn't solve your problem 100% since the browser's status icon will keep moving until the script has actually finished off, but at least you'll get some output first and the user can continue to navigate without having to wait for completion.

#!/home/bbq/bin/perl
# Trust no1!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://19784]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.