Department of Mathematics FAS Harvard University One Oxford Street Cambridge MA 02138 USA Tel: (617) 495-2171 Fax: (617) 495-5132
FAS Computer Services to Harvard University IT: (617) 495-7777.

Perl is a sophisticated programming language. Since it is widely used for dataprocessing, scripting or on the web, it is also called the "glue of the web". These pages for example have been "written" by Perl. Here are some snippets of perl code.

Produce array from output Produce list of ASCII letters
Working with big integers Read command and execute it
Distinguish =,==, eq Reports fileusage sorted according to users
wget implementation A hello world program
Fetches illigal prime to build code (from a slashdot story) Illustrates simple pattern matching
Build matrix from data Collection of one-line programs (adapted from Christianson's one line collection)
Demonstrates simple input/output A primitive shell
Demonstrates call of random, substituation Writes webpage pointing to a random picture in the directory
Remove new lines Demonstrates stdio
Pulling strings out of a binary file Demonstration of some data types
Substitute term by an other in a file Changes ^M newline characters to newlines
Extracts title and number of bytes of a webpage
Perl has its own documentation which you can access defined functions like in the following example
perldoc -f log

CPAN Comprehensive Perl Archive
Scripts repository
HCS Perl Language Reference guide (PDF)

Some books:
  • The O'Reilly books "Programming Perl", "Perl in a Nutshell" or "The Perl Cookbook".

Simplicity, Clarity, Generality B.W. Kernighan, R. Pike, in "The Practice of Programming".