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

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.

See Troubleshooting Scripts

Saving to a file Using the Split Function
CGI Online is a service provided by Net Success 2000 Plus.
PO Box 1508
Somerset, KY 42502
Last Modified: October 9, 2007

| HTML TOC | Website Design Workshop | Home |