Perl Programming for the World Wide Web

Ruben Safir

Copyright 1999

Recommended Books:

Programing Perl (The Camel Book):

Authors: Wall, Chrstiansen & Schwartz

Publisher: O'Reilly

CGI Programming on the World Wide Web

Authors: Shishir Gundavaram

Publisher: O'Reilly




Compuserve: go unixforum

Mailing List:


PERL: The Practical Extraction and Reporting Language.

Perl is a blue blooded unix programing language. While it has been graphed to other operating systems,

it's lineage and pedigree is Unix through and through.

In the beginning the computer world was astonishingly empty and chaotic. Then ATT created Unix , shells, and the B - which later became the C programming language. And ATT said it was good. And most of the programming world concurred. Then ATT created text and split that text between ed the first basic text editor, and cat , the program that prints text to the screen. And the ed was called an editor. And ATT said it was good. And the Unix G-d's said it was good. Soon, ATT separated the regular expressions between sed and grep. And the Visual Editor appeared. And the regular expression engine was split between the command line below, and VI above. The Unix G-ds said it was good.

Then the Bourn Shell sprang from the shell, and was fruitful and multiplied until finally the System Administrator was created. The system administrator named all the users and protocols, each according to his insight...but confusion spread in the system administrators life, for he eat from the binary tree. And the Unix G-ds banished the system administrator to the land of AWK. But even with Bourn, Sed and Awk, the ground laid infertile.

Finally the Unix G-d's had mercy, and gave the system administrator children PERL And programers and system administrators grew fruitful and multiplied.

or something like that........

Syllabus: for Day 1

Introduction to Unix :


The command line:

Multi User environment

Standard input, standard output, and data streams.

Files and Permissions:





ps -aux


The Vi Editor:

calling the editor:

Command Mode

Insert Mode

Shell escape

write and quit







The first perl program:


print "Hello World";


$scalars - data types or the lack of them

@lists or @arrays

Strings and Quotes (page 41)


escape operators (page 40)

Functions in the general form

Structured Program Design

Operators and Assignment


Arithmetic Operators

+, *, %, +=, -= and, **

String Operators

= ,. ,x , x=, and, .=

Unary Operator

++, --

Logic Operators

&&, ||, ! and, or, not

Comparison Operators

Two Types

Numeric: ==, !=, <, >, <=, <=>

String: eq,ne,lt,gt,le,cmp


NOTE: == and = are NOT THE SAME

Precedence and Associativity: (page 76)

Left, right non-associative


Input and Globbing:

open, close

Angle Brackets

Unary File test operators (page 85)

@ARGV (Page 55)

Conditional Expressions: