Execute the script from the command line

It can be challenging to try and debug a Perl script using a web browser. For instance, file permissions, a syntax problem, or something else entirely could be the reason of a "Internal Server Error" message. By login into your SSH account and running the script from the command line, you can get a lot more helpful information about script failures. To do this, type the following the command, replacing filename with the script filename:

perl filename

When there is an error, the Perl interpreter outputs detailed information about the type of error, and often the exact line number in the script file where the error occurred.

If you need even more detailed information or control over the script's execution, you can run the script in the Perl command-line debugger. To do this, type the following command:

perl -d filename
Was this answer helpful?

Related Articles

Verification of Perl scripts having correct permissions set.

Check to see if the permissions on the Perl script file are appropriate. Which file permissions...

Verification of the Perl script file is in UNIX text format.

A Perl script file should be in UNIX text format, not DOS. Line breaks are encoded differently in...

Checking of web server error logs

Only Perl scripts that are executed as CGI scripts via a user's web browser are covered by this...