Installing and Using Perl Scripts
- Part I
by Outfront Moderator Katherine
Nolan (abbeyvet)
Introduction and Preparation
You have made a site in FrontPage and you are happy - for a while. Then there are things you want to add and you discover that FrontPage cannot help. People keep telling you about this script and that one that will do what you want but Perl...cgi...FTP...SSI... these are foreign terms. Where on earth do you start?
Right here.
In this tutorial we are going to guide you through the steps involved in setting up a cgi script and integrating it into your site. Not in theory, but in practice using a script that will automate the running of polls at your site. Even if you already have some sort of a utility that does this you can still follow along and add this to a test page in your site. This installation will involve you in all of the basic steps needed to install any script, once you have successfully completed this one there will be no problem moving on to other and more complex scripts.
A Few words about Perl and CGI
First the good news: you do not need to know anything at all about Perl or CGI to begin installing and using scripts. These tutorials will assume you know absolutely nothing. However it is no harm to have at least a basic understanding of what is going on when you use Perl/CGI on your site.
Perl and CGI, though the terms are often used interchangeably, are not the same thing.
CGI stands for 'Common Gateway Interface' and describes a method by which data is passed from a user to some program for processing and then back again to the user. To put it simply let's look at the example of a user poll on a web page.
-
A user of the page votes in the poll
-
The user's input is passed to a program
-
The program records the vote and adds it to all previous votes
-
A page is served which shows the user the result of the poll so far.
The interaction between the user, the program and back to the user again is handled using CGI.
The program that does the work could be written in any of a number of languages but the most commonly used one is Perl. Perl and CGI work very well together and there are a huge number of ready-made scripts, or programs, available which make use of this Perl and CGI to provide a range of utilities for use on websites.
And that, really, is about it. So, lets begin.
The first thing you need to do is ensure that you have everything you need for an installation and that your host provides support for this sort of script.