Perl: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
= 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. | 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 = | |||
If you need a different version of Perl, you'll need to get a [https://heliohost.org/vps/ VPS]. | If you need a different version of Perl, you'll need to get a [https://heliohost.org/vps/ VPS]. | ||
Line 16: | Line 16: | ||
|} | |} | ||
= Enabled = | |||
= Extensive set of default libraries = | |||
HelioHost offers more than 100 Perl libraries by default on all free hosting accounts. | 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. | 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. | 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: | 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 were transferred from the old cPanel, your main domain will be parked on the `public_html` directory. | ||
Line 42: | Line 42: | ||
If you created a new account on Plesk, your directory will be `httpdocs`. | 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> | <pre> | ||
Line 51: | Line 51: | ||
</pre> | </pre> | ||
= Edit file permissions = | |||
Edit the `perl.pl` file's CHMOD permissions to `755` (`rwx r-x r-x`). | 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. | Navigate to `domain.heliohost.us/cgi-bin/perl.pl` in your browser. | ||
Line 61: | Line 61: | ||
If everything is working you should see `Perl as CGI is working...` displayed 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`). | Leave the first line as the shebang (`#!/usr/bin/perl`). | ||
Line 69: | Line 69: | ||
Ensure you output a `Content-type` header before anything else. | 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: | If you prefer to make Perl executable directly inside the `httpdocs` folder, you can do this by using an `.htaccess` file with these contents: | ||
Line 80: | Line 80: | ||
You can then navigate to `domain.heliohost.us/perl.pl` and view the `Perl as CGI is working...` success message. | 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]. | A good tutorial can be found [https://perlmaven.com/installing-perl-and-getting-started here]. |
Revision as of 15:54, 4 October 2024
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
If you need a different version of Perl, you'll need to get a VPS.
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 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:
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:
#!/usr/bin/perl print "Content-type: text/html\r\n\r\n"; print "Perl as CGI is working...";
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:
Options +ExecCGI AddHandler cgi-script .pl
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 here.