Add the following code to your .htaccess file, to ensure your Perl scripts are run correctly: Options +ExecCGI AddHandler cgi-script .pl
Ensure that your Perl script is located in the cgi-bin folder. You can locate the cgi-bin folder by navigating to the folder your website is in (usually public_html).
Make sure your script starts with the following code; this will ensure that the script is run as a Perl script: #!/usr/bin/perl
You will need to add special “execute” permissions. You can do this by running the following shell command using the shell built into cPanel or SSH: chmod +x /path/to/perl/script.pl