Table of Contents

Introduction

What is CGI? Why learn it? What do you need to get started?

1

Getting Started

Where to write your programs; how to upload to the server; changing permissions; writing your first CGI

2

Perl Variables

Scalars, arrays, and hashes

3

CGI Environment Variables

Using data from environment variables; writing forms using HTTP GET

4

Processing Forms and Sending Mail

Writing forms using HTTP POST: a form-to-mail CGI

5

Advanced Forms and Perl Control Structures

Handling radio buttons, checkboxes, and select fields; writing a survey/poll CGI

6

Reading and Writing Data Files

File permissions; how to open, read, write, and close files

7

Working With Strings

Comparing, finding, joining, and formatting strings

8

Server-Side Includes

How to include files and execute CGI programs from within a web page.

9

Working With Numbers

Number operators and functions; random numbers; a random image picker; random rotating ad banners

10

Redirection

Sending the viewer to another URL using a CGI script.

11

Multi-Script Forms

Passing variables from one script to the next; writing a simple web catalog and order form

12

Searching & Sorting

Finding something in a string or file; sorting a list of values

13

Regular Expressions

Pattern matching with Perl

14

Perl Modules

Take advantage of Perl's vast library of existing code.

15

Date and Time

How to find or format a date. Count down (or up) to a date in the past or future.

16

Database Programming

An introduction to working with MySQL databases. Create a database-driven web catalog.

17

HTTP Cookies

How to set and read cookies in your visitors' web browser.

18

Writing Modules

Create your own custom modules to share code among multiple CGI programs.

19

CGI Security

Protecting your data.

20

Password Protection

How to password-protect scripts and web pages.

A

Unix Tutorial and Command Reference

A quick-reference guide to working with the Unix command line.

Get the book!

Download the digital version immediately, or order a printed copy from Amazon.

Back to Top