in reply to PERL CGI - waiting page is hanging

You might consider doing this with AJAX. Once the job request is made, the web page will display a "working..." message (while the job is run server-side, independent of the page view). Once the job completes, you'll see a "Done!" message.

I wrote a demo to illustrate this a while back in answer to another question, but it may help you as well.

Good luck!