IN20 Perl/CGI Programming
 
Length/Format
2-3 days
Lecture, discussion, demos and hands-on labs
Description
This course introduces the student to the Perl5 scripting command language with particular emphasis on its use in HTML/CGI applications. Perl is a powerful UNIX/Win32 scripting language that blends a C/Shell syntax with extensive RE parsing, IO facilites, filesystem functions, process control and networking.

Fundamental topics are applicable to all Browsers and HW platforms including Win32 and UNIX. Advanced topics may require specific platforms and software.
Audience
This course is intended for experienced Unix/Win32 users and programmers. Familiarity with some programming language, basic HTML coding and the target platform (Unix/Win32) is assumed.
Key Topics
INTRODUCTION AND BASIC OPERATIONS - Overview and Features; Invoking Scripts, Implicit/Explicit, Win32 vs Unix, Debug Mode: Variables and NameSpaces, Expressions, Literals, Operators; Simple Terminal I/O; Conditional Statements, if/else/elsif, Blocks, Numeric/String Operators, Case, Conditional Stmt Execution; Looping Constructs, while/until, Iterators, Flow Control next/last/redo, for/each lists; ARGV Cmdline Processing, Token Access; Examples

LIST FACILITIES & STRING PROCESSING -
Lists and Arrays, Syntax/Assign, Numeric Indexing, Access, Manipulating Items shift/push/pop, Combining and Searching split/join/grep, sort/reverse; Associative Arrays, Key Processing, Extracting Data keys/values/delete, each Iterator; ENV Variables; List References, Data Structures; Examples
RE Patterns, SuperSet Meta haracters, Operators/Functions m/s/tr, Grouping/Parsing; Substitution & Translation; String Functions length/substr/index, Operators Concat/Repeat; Examples

FILE PROCESSING & SUBROUTINES -
Open/Close Disk Files & Pipes, Modes, Errors; Reading Variable Length Delimited Data; FileSystem Commands, Conditional Operators, Directory Processing; Formatting Tablular Reports; Fixed Length & Binary Data; Examples
Subroutines, Declaration & Invocation, Variable Scoping, my/local, Parm Passing/Return Facilities; Variable & List References, Passing Arrays; Modules & Packages, use/require; Examples

CGI PROCESSING ESSENTIALS -
Overview, HTTP Protocol, CGI Architecture; HTML, URLs; HTML FORM tag, Components; Script Essentials, Flushing, Headers, MIME Types, Page Elements; CGI Environment Variables, CGI Script I/O; Encoded QueryString, Literals, Processing; Server-side File I/O; Examples
CGI.pm Module, Overview, Importing Sets, Calling Syntax Fcn vs Object; Basic :HTML Functions, header/start/p/br/a/img/li; :CGI Functions, param/url/redirect/Delete, EnvVar Retrieval; Examples

CGI FORMS PROCESSING -
Overview, <FORM> Tag, Attributes, Element Names; Form Data Elements Review; GET vs POST Method; Handling Form Data via ENV Vars vs CGI.pm Functions; Static vs Dynamic Form Generation; CGI.pm Form Display Functions, Parameter Caching/Override; Examples

ADVANCED CGI TOPICS -
Cookies, Definition, Usage; Name/Value Specification, Expiration Dates, Path/Domain Spec; ENV Vars vs CGI.pm Functions; Headers, Cookie Function, Scalars & List Data; File Uploads, Overview, FORM Elements, Encoding Type; Server-Side Processing, Handles; SSI HTML Elements; Identifying Client-side Browser, Compatibility, Examples;
 
Copyright 2011 AJC Information Solutions     http://www.ajcis.com    info@ajcis.com     973.605.8373