The goals for the next five or six weeks are to learn the Perl programming language and the WWW Common Gateway Interface (CGI).The CGI is the part of the WWW architecture that allows the data from a form filled out by a user through a conventional WWW browser to be processed by a program running on a WWW server. Often, that program will interact with a database, but it may also process the data from the form, itself. Results are expressed in HTML which, in turn, is embedded in an HTTP message and returned to the user's browser for display.
Perl is a very terse programming language that has become the language of choice for many CGI programmers. It is especially well-suited for processing string data, and it has convenient functions for interacting with the operating system. It's main disadvantage is that because it is so terse, if programmers don't document their code well, understanding it at some later time can be very difficult.
The discussion of Perl will proceed through three phases. First, we will work through a Perl/CGI tutorial. It is narrative in its organization, introducing features of the Perl language as they are needed to solve a cumulative problem. That problem is passing data to a Perl program through CGI and generating a response in HTML and embedding it in HTTP. After working through the tutorial, we will discuss the major features of Perl in a systematic and comparative fashion. Finally, you will carry out a modest Perl/CGI project, which you will have the opportunity to present in class (as well as on your homepage for your WWWP course work).
Background and Mechanics for Working with Perl
The goals for the next several discussions are to learn the Common Gateway Interface (CGI), understand how Perl programs can be accessed through CGI, and begin learning the Perl language.Today's discussion will review prior work, such as students' homepages for WWWP course-related work and the foundation material discussed previously. The discussion will also go over the mechanics of invoking the Perl interpreter in your local computing environment and the conventions used there for storing or designating programs as CGI programs to the WWW server you will be using. Work on the PERL/CGI Tutorial will begin in earnest with the next discussion.
Topics
- Class administrative matters.
- Review students' homepages for course-related work.
- Discuss the Schedule for the unit of work on Perl.
- Note: CGI project description due date
- Review materials from last class.
- Background for using Perl within the context of WWW
- Perl mechanics
- Path to Perl interpreter
- Local conventions for designating Perl programs (e.g.,
cgi-bin
directory,.cgi
suffix, etc.)- Perl/CGI
Assignment for Next Class
- Read Perl/CGI Tutorial, steps 1 - 4.