On Linux accounts our Perl executable is located at /usr/bin/perl. This is needed for the shebang at the top of a Perl CGI script. On windows accounts this is handled automatically.
How to configure Perl
- First navigate to your domains web service settings through the hosting control panel.
- Select add CGI Alias
- Second enter the extention you wish to use for Perl. I will be using .pl
- Press submit and that’s it. Just make sure you are using the correct Perl path at the top of your scripts and that you are placing them in the cgi-bin directory.
Here is an example “Hello world” Perl CGI script you can use to test if your configuration is correct:
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html>\n"; print "<body>\n"; print "<h1>Hello Perl!</h1>\n"; print "</body>\n"; print "</html>\n";
Last modified: 2018/04/30 at 09:49 by James