Main index

Introducing UNIX and Linux


Perl

Overview
Introduction
      Why yet another utility?
      Beginning Perl
      Invoking Perl
      Documentation on perl
      Perl Scripts
Variables
Input and output
      Files and redirection
      Pipes
      The DATA filehandle
Fields
Control structures
Predefined Perl
      Functions
      Modules
Regular expressions
      Single character translation
      String editing
Perl and the Kernel
Quality code
When do I use Perl?
Summary
Exercises

Perl Scripts

Superficially a Perl script looks similar to a shell or an Awk script, and consists of a sequence of statements. Blocks of code can be enclosed in braces, and many of the basic commands, such as printf, are the same. There is one initial difference that often confuses, which is that every statement must be terminated by a semicolon. The end of a line has no significance to Perl.


Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck