← Perl View source for Perl You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in the group: Users. You can view and copy the source of this page. = Perl = Perl is one of the most established programming languages on the Internet. With its powerful string processing capabilities and the optional availability of almost every library imaginable, Perl is an excellent choice for somebody looking to allow flexibility and expandability. At HelioHost, we offer Perl configured with more than 100 basic libraries and can add additional modules upon request. If you're a Perl developer looking for free hosting, HelioHost is the place to be. = Details = {{Info|If you need a different version of Perl, you'll need to get a [https://heliohost.org/vps/ VPS]. You can get a 10% discount when you pay for 6 months upfront.}} {| class="wikitable" style="margin:auto" |- ! Server !! Path !! Version !! Loader |- | Johnny || /usr/bin/perl || 5.16.3|| CGI |- | Tommy || /usr/bin/perl || 5.16.3 || CGI |} = Enabled = = Extensive set of default libraries = HelioHost offers more than 100 Perl libraries by default on all free hosting accounts. = Requesting additional Perl libraries = To request additional libraries, please raise a request in the [https://helionet.org/index/forum/45-customer-service/?do=add Customer Service forum], making sure to provide your '''username''', your '''server''', and '''the libraries you need''' including any relevant '''version numbers''' for them. = Disabled = = Root-level Access = As a security restriction, we force each Perl script to run as its HelioHost user through suEXEC. This prevents any actions that require root-level access. This shouldn't be a problem for legitimate uses. = Getting Started = Perl scripts are easy to configure and run. To test it out with a simple example, follow the steps below: = Navigate to your main domain = If you were transferred from the old cPanel, your main domain will be parked on the `public_html` directory. If you created a new account on Plesk, your directory will be `httpdocs`. = Create a `perl.pl` file inside the `cgi-bin` directory with these contents: = <pre> #!/usr/bin/perl print "Content-type: text/html\r\n\r\n"; print "Perl as CGI is working..."; </pre> = Edit file permissions = Edit the `perl.pl` file's CHMOD permissions to `755` (`rwx r-x r-x`). = Open file in your browser = Navigate to `domain.heliohost.us/cgi-bin/perl.pl` in your browser. If everything is working you should see `Perl as CGI is working...` displayed in your browser. = Guidance for editing `perl.pl` = Leave the first line as the shebang (`#!/usr/bin/perl`). Below the shebang, you may write Perl code. Ensure you output a `Content-type` header before anything else. = Making Perl executable inside `httpdocs` = If you prefer to make Perl executable directly inside the `httpdocs` folder, you can do this by using an `.htaccess` file with these contents: <pre> Options +ExecCGI AddHandler cgi-script .pl </pre> You can then navigate to `domain.heliohost.us/perl.pl` and view the `Perl as CGI is working...` success message. = Further Learning = A good tutorial can be found [https://perlmaven.com/installing-perl-and-getting-started here]. Template used on this page: Template:Info (view source) Return to Perl.