Legacy


  1. Home
  2. Support
  3. Legacy
  4. Scripting
  5. How to run Perl CGI
Click here for full details

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.

 

    1. Select add CGI Alias

    1. Second enter the extention you wish to use for Perl. I will be using .pl

  1. 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";
Click here for full details

Classification: Public
Last saved: 2021/11/11 at 14:23 by Jamie