PERL CGI Tutorial
for Writing Interactive Form Scripts
Shebang Line
The Shebang Line derived from (#) sharp , (!) bang is the first line on every Perl script.
It supplies the path to the Perl interpreter on your server.
The path to Perl on your local server can be found by looking at the autoexec.bat file.
If you use a standard set up of:
C:\usr\bin\perl.exe
The shebang line would then be:
#!/usr/bin/perl
Note: When using the IndigoAMPP server, the shebang line in your scripts should be:
#!C:/indigoampp/perl-5.10.0/bin/perl.exe
Remember to change it to your web host's setting when you upload your scripts.
Most novice script builders will forget to check the shebang line before they upload to their web site. Always check your web host's CGI help files for the correct location of the PERL interpreter on their server.
The browser will not be able to execute your scripts on your web space if the location of Perl on your web host's server is different than the location of Perl on your local server. You must provide the correct path information in the shebang line.
Contents
Home
Getting Started in CGI
Send HTML Page to Browser
Parse HTML Form
Saving to a File
Open a File and Display Contents
Using the Split Function
Search a File
Sort a File
Display a Multi Line File in Tables
Display a Multi Line File in a Textarea
Working with Numbers
Using Sendmail
Need Web Hosting?
We Recommend these products
Free Flash Websites
