in reply to how to prevent browser timeouts

Hi,
Are you system administrator in the machine which have the script?
Your question "is not perl related" I think. You can configure the script timeout in webserver's configuration file.
As merlyn said, you are trying to do tasks that isn't supposed to do by a CGI.
Use better a non CGI script to do this jobs.

Hopes
$_=$,=q,\,@4O,,s,^$,$\,,s,s,^,b9,s, $_^=q,$\^-]!,,print