Course Description

This course bridges the gap between using HTML to create static Web pages and using Perl CGI scripts to create dynamic Web pages. The course emphasizes using the Perl 5 CGI library routines to process HTML forms by providing extensive working examples and by students writing applications to illustrate the concepts presented. This course is not intended to be a substitute for a Perl programming course.



3 days


Target Audience

This course is suitable for Web site developers wanting to create interactive Web pages.


Course Prerequisites

Familiarity with HTML forms. Programming experience is required. Basic UNIX skills and the ability to use VI or a basic text editor are also required. The required skills are taught in the following courses:

GTU1, 2, 3 and 4 – Linux Fundamentals 5-day Course, Unix Fundamentals 3-day Course, Oracle Solaris Fundamentals 3-day Course, HP-UX Fundamentals 3-day Course

If you have any questions or doubts as to whether you meet the pre-requisites for this course, or indeed are wondering which course best suits you, please consult with us to discuss your suitability for course attendance.


Suggested Follow on Courses

There are a number of options of suitable follow-on courses, depending on your business needs. Please contact us for further details.


Course Content

1. Course Introduction

Course Objectives

Course Overview

Suggested References

2. The Internet and the Web

TCP/IP and Ports

DNS vs. Hosts Files

Servers and Clients

Client/Server Protocols

 3. Browsers and Servers


WEB Browsers and Servers

The Hypertext Transfer Protocol

HTTP Requests and Responses

HTTP Headers

HTTP Requests

Mime Types

 4. Introduction to CGI

HTML Tag Structure

HTML Document Structure

URLs and CGI

CGI Programs

Running and Debugging from the Command Line

Running and Debugging from a Browser

Handling an HTML Form with CGI

Generating HTML

5. CGI and Perl


Perl Programs

Why Use (and Where is It?)

Running and Debugging from the Command Line

Generating HTML with

Running and Debugging from a Browser

 6. Generating HTML

Introduction to

How to use’s Online Documentation’s Rules for General HTML Tags’s Rules for HTML Form Tags

Named vs. Positional Parameters in

 7. Generating Forms

General Structure of HTML Forms

Form Element Tags




Popups and Listboxes

Textfields, Passwords, and Textareas

 8. CGI Data Flow Architecture

URL Encoding and Decoding

Data Flow between Browsers and Servers


Which to Use?

CGI Environment Variables

Accessing CGI’s Environment Variables

 9. Processing Form Data

Static Forms

Dynamic Forms

Controlling Flow with User Input

Accessing Form Data Using

The param Method of

Sticky Widgets

Validating Input from the Browser

Command Line Debugging

 10. Client-Side Statefulness

Stateful vs Stateless

Why use Stateful CGI Applications?

Program to Program Interaction

Stateful Access with Hidden Fields

Multiple Forms and Hidden Fields

Stateful Access with Netscape Cookies

Using Cookies with

Cookie Management

 11. Database Access

Server-Side Statefulness

Flat-File Databases

Structuring Text Data

File Permissions and Flat-File Databases

Perl’s DBM Interface

Perl’s DBI/DBD Interface

Issues with Statefulness

 12. Additional Web Programming Features

Extra Path Information


Server Side Includes (SSI)

The exec command

A Page Hit Counter Using SSI

Animation Description

Netscape’s Server Push

Client Pull

The Module

 13. CGI Security Issues

Browser to Server Security Issues

CGI Security Issues

CGI Interaction with the Operating System

Database / File System Overflow

CGI and User Authentication

14. Appendix 1 – Overview of Perl

What is Perl?

Running Perl Programs

Sample Program

Another Sample Program

Yet Another Example

 15. Appendix 2 – Perl Variables

Three Types of Variables

Variable Names and Syntax

Variable Naming


Scalar and List Contexts


Hash Functions

 16. Appendix 3 – Flow Control

Simple Statements

Simple Statement Modifiers

Compound Statements

The next, last, and redo Statements

The for Loop

The foreach Loop


See more Linux/Unix courses