in reply to CGI / HTML problem

See Watching Long Processes Through CGI. If your webserver is purely written in Perl, you will have to do the hard/long work in a background process or thread, or use POE or Coro.