Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

RE: Background Process

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


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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2025-07-19 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.