Up Next
Go up to 4 Major Topics
Go forward to 4.2 Individual CGI Introduction to Perl Topic

4.1 CGI Introduction Topic

The purpose of this section is to introduce, UNIX, Perl and CGI concepts. This for some, will be a review, for others new material. It will establish a starting point for the class and provide an introduction to the computer system used in the class, "cgi".

4.1.1 Preparation

Preparation for this section requires you to obtain an overview of how the various parts and pieces of the Internet and Web are tied together through the use of servers and clients. To do this:
  1. Review your UNIX skills. You may want to look at "The UNIX Reference Desk".
  2. Review your HTML skills. You may want to look at NCSA's "A Beginner's Guide to HTML".
  3. Look at an introduction to Perl. This can be the first chapter of Programming Perl by Wall, Christansen, & Schwartz and/or the first chapter of Learning Perl.
  4. Look at the Perl module list. Think about which ones might be useful writing CGI scripts. This can also be found at CPAN, the Comprehensive Perl Archive Network.
  5. Read the first chapter of CGI Programming on the World Wide Web by Shishir Gundavaram. This book is out-of-print. It can be accessed on line at ORA. This will provide an introduction to CGI scripting.

4.1.2 Individual Lab Assignment

  1. Log-on to system cgiand change your password using the passwd command. (Choose a good password, but for this class you might as will write it down.) Verify that all members of your group have the same GID. Use the id command.
  2. Set up your account the way you will like it this semester.
  3. Create and set permissions on the directory public_html world read and execute. Within this directory create and set permissions on the directory public_html/cgi-bin world read and execute.

     

  4. Make sure that your public_html directory is set up correctly by creating an index.html file. You can also polish your HTML skills with this lab. It won't hurt at all of it shows off your creativity. Place several links in your index_html page. Link to the other members of your group. Plan on maintaining this page this semester so that it points to both your individual work and your group's work.

    Remember to test your page with a web browser.  

  5. Convert your index.html to a cgi program written in Perl. Create a program in your cgi-bin directory that is written in Perl that generates the same web page as your original index.html file. Then modify both so that the link to one another.
  6. Create (or find) a Perl program or a shell script that displays the environment variables as seen by the running program. Examine the results of this program using a web browser. This will provide some insight in to what can be done with CGI programs. It turns out that this will be a useful program all semester.

4.1.3 Report

Your report needs to include the following: Place the lab in the instructor hand-in box in BUS R6E, the "terminal room".
Instructor: ltaber@pima.edu** My new Home on phRed** The Pima College Site** The Mad Dr. G.'s home page on phred.

Up Next