This probably won't help to solve your problem completely, but it would certainly help to shorten up your program considerably and make it more robust and easier to read. You should use the CGI module from CPAN intead of printing all your own headers and html etc.
http://search.cpan.org/dist/CGI.pm/CGI.pmIn reply to Re: PERL CGI - waiting page is hanging
by davidov0009
in thread PERL CGI - waiting page is hanging
by chanklaus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |