Difference between revisions of "Perl"

From Hostek.com Wiki
Jump to: navigation, search
(Created page with "__FORCETOC__ ==How do I enable execute permission for Perl scripts?== <B>Windows servers:</B> Our Windows servers, no extra steps are needed to set permissions to run your Pe...")
 
Line 6: Line 6:
  
 
<B>Linux servers:</B>
 
<B>Linux servers:</B>
Using your FTP program like CuteFTP or Ws_ftp, CHMOD the files to have 755 permissions. This will give the script execute permissions.
+
Using your FTP program like CuteFTP or Ws_ftp, CHMOD the files to have 755 permissions. This will give the script execute permissions. <br />
 +
- Alternatively, you can change these permissions in the cPanel file manager. This is done by right clicking on the PERL file and  going to "Permissions" then selecting "Execute" for User, Group, and World.
  
 
NOTE: All Perl (.cgi and .pl) files MUST be uploaded in ASCII (text) format, NOT binary.
 
NOTE: All Perl (.cgi and .pl) files MUST be uploaded in ASCII (text) format, NOT binary.
Line 22: Line 23:
 
the .pl or .cgi extension. The exact path to Perl doesn't
 
the .pl or .cgi extension. The exact path to Perl doesn't
 
really matter. However, you still need something like
 
really matter. However, you still need something like
#!d:/perl/bin/perl.exe
+
#!d:/perl/bin/perl.exe
 
as the very first line of your script.
 
as the very first line of your script.
  
 
<B>Linux servers:</B>
 
<B>Linux servers:</B>
#!/usr/bin/perl
+
#!/usr/bin/perl
  
 
==What is ActivePerl?==
 
==What is ActivePerl?==

Revision as of 01:15, 22 January 2014


How do I enable execute permission for Perl scripts?

Windows servers: Our Windows servers, no extra steps are needed to set permissions to run your Perl scripts.

Linux servers: Using your FTP program like CuteFTP or Ws_ftp, CHMOD the files to have 755 permissions. This will give the script execute permissions.
- Alternatively, you can change these permissions in the cPanel file manager. This is done by right clicking on the PERL file and going to "Permissions" then selecting "Execute" for User, Group, and World.

NOTE: All Perl (.cgi and .pl) files MUST be uploaded in ASCII (text) format, NOT binary.

In my HTM (HTML) page, how do I reference my PERL scripts?

You should place your Perl CGI scripts in your cgi-bin directory. Then in your HTM (HTML) page you would have a line something like this...

<FORM Method=POST Action="cgi-bin/yourscript.cgi">

What is the path to PERL pl .pl cgi .cgi?

Windows servers: On our Windows servers, Perl is associated via the .pl or .cgi extension. The exact path to Perl doesn't really matter. However, you still need something like

#!d:/perl/bin/perl.exe

as the very first line of your script.

Linux servers:

#!/usr/bin/perl

What is ActivePerl?

ActivePerl is the Windows version of Perl. ActivePerl works just like Perl, except it's been ported to Windows servers.