If your Perl script is returning an Error 500, there are a few steps you can take to find out what the problem is.
Check that you have uploaded the script through FTP in ASCII mode, not Binary.
Make certain that the interpreter path on the first line of the script is:
Ensure that the script’s filename ends In either a .pl or a .cgi.
All scripts should have a file permission of 755 or rwxr-xr-x. This means that the owner can read, write, and execute the script, and all others can read and execute the script.
In the second line of your script (after the interpreter path), put this line:
use CGI::Carp qw(fatalsToBrowser);
This prints the error in your browser window instead of the existing ‘500 Internal Server Error’ page.
In your eXtend Control Panel, you can check the error logs for your site in ‘Log File Download' under 'Web Stats & Logs'.
Article ID: 412
Created On: Mon, Mar 16, 2015 at 3:23 PM
Last Updated On: Thu, Apr 23, 2015 at 12:27 PM
Online URL: https://www.heartinternet.uk/support/article/why-are-my-perl-scripts-failing-with-error-500-internal-server-error.html