I'm guessing you didn't include any error messages in your post because this is a CGI script and you don't know how to find them. Here's some tips for debugging CGI errors.
- Use perl -c <filename> after any changes. This tells perl to load up your script and parse it but not execute it ('use' statements and BEGIN blocks will be executed). If there are any syntax errors in your script, they should be found here. Since you're getting an error when trying to use strict, this should tell you more about the problem.
- Execute the code from the shell. This is real easy if your script doesn't accept form input or look at web server provided environment variables but even if it does that's easy enough to provide. Any expected environment variables can be set to appropriate values before executing the script. Form variables can be provided on the command line as field=value pairs (you are using CGI.pm to parse your form input, right?).
- If you get past these steps and still have problems executing your code from a browser, look for your web server's error log file. Any output to your application's STDERR should be written to that file. As an alternative, add the following to the top of your script to have your own error log:
or die "Unable to open errorlog";
Make sure that whatever account your web server uses to execute scripts has write access to the file and directory you specify.
|90% of every Perl application is already written. ⇒|