Knowledgebase: Information On Perl
Are there a list of steps for debugging my Perl script(s)?
Posted by Roy Petersen on Feb-15-2007 12:16 PM
Below is a list of steps to go through to troubleshoot any problematic Perl scripts. These are the same troubleshooting methods employed by the technical support repetitive at
  1. Gather Information about the Problem
  2. Execute the Perl script through the command-line.
If the output indicates a syntax error with the Perl script. The problem has been identified as a problem with the code in the Perl script.

If the error "Command not found." is returned at the prompt, do the following:
  1. Check the permissions on the actual Perl script. Must be executable!
  2. Retry. If it still fails, then check the permissions on all directories leading up to the Perl Script. They must be set to rwxr-xr-x, or chmod 755.
If the script will execute (possibly return HTML output) through shell, but still gets an "Internal Server Error" through the web, do the following:
  1. Ensure that the file permissions are set to rwxr-xr-x, or chmod 755.
  2. Ensure that the file permissions are not set to rwxrwxrwx, or chmod 777.
At this point, you must know the source of the problem, whether it be a permissions problem or a syntax error within the Perl code itself. Now all you must do is fix it!