Legacy


  1. Home
  2. Support
  3. Legacy
  4. Scripting
  5. How to run Perl CGI

How to run Perl CGI

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

  1. First navigate to your domains web service settings through the hosting control panel.
  2. Select add CGI Alias
  3. Second enter the extention you wish to use for Perl. I will be using .pl
  4. 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";
Was this article helpful to you?

Last modified: 30/04/2018