system() is blocking, webservers don't like cgi programs that block and take a long time ...
Proc::Background can help with that if thats the problem, the checklists help with the rest :)
Basic debugging checklist ,
brian's Guide to Solving Any Perl Problem,
CGI Help Guide ,
Troubleshooting Perl CGI scripts