PERL/CGI Introduction
Course Description
This course provides an in-depth understanding and hands-on knowledge of the capabilities of the de facto Internet client-server communications protocal: Common Gateway Interface (CGI).
Students will learn about the specifications of the CGI protocol, how it operates and how to use the PERL language to perform common and powerful CGI communications and processing tasks on a Web server.
To get the most from this course students should have a good understanding of HTML. Experience in another programming language is desirable but by no means essential.
Duration: 2 days
Introduction to CGI
CGI: Beyond HTML
How a Web Server functions
The CGI protocol
CGI programming languages
Introduction to PERL
History of PERL
PERL advantages and disadvantages
The PERL interpreter
PERL file conventions
Using PERL on Unix
How PERL talks to the Browser
PERL/Browser communcations
Making CGI look like a Web page
Print using "qq"
Printing multiple lines
PERL Variables
Variables
Variables
Scalar variables
Array variables
Hash variables
PERL Loops and Logic
Loops
Logical operations
if
Else & elsif
How the Browser talks to PERL
Environment variables
GET & POST
Using CGI.PM
Debugging CGIs
Storing & retrieving information
Storing data
Appending data
Reading data
REGEX: The Match Operator
Introduction to Regexes
The m// operator
i modifier
Special characters
Character classes
Parentheses
REGEX: The Substitute Operator
s/// operator
More modifiers
Backreferences
tr/// operator
Subroutines
Organising data
Scoping
Functions
CGI Techniques
Outputting graphics
Outputting PDF
Redirecting the Browser
Using HTML Templates
Cookies
Sending e-mail using CGI
CGI Security
Web Server security
Writing secure CGIs