[
Course Page |
Lectures |
Resources
]
Civil Engineering 82.562 -- The Perl Programming Language
A Perl Tutorial
This is a "getting started" tutorial on the Perl programming language.
You will probably also want to refer to the following material:
Also, DOS users will probably want a copy of Perl for DOS. Unix users
needn't worry - its already there.
About the Tutorial
The following material is meant to be read sequentially. We try to
spend some time introducing most of the concepts of data and
variables. More thorough examples of complete programs will come
later.
The official Perl motto is "There is more than one way to do
it". In this tutorial, we by-and-large mention one way only, and
we usually try to mention the way that is "simpler" and closer to other
programming languages.
In the following, links denoted by Quiz are self tests
that you should take to test your understanding of the material.
The Lessons
In the first several lessons, we mostly show how Perl shares a
number of characteristics with more common languages, so as not to
scare you too much.
- Introduction.
Preliminary Material: Data, Variables and Expressions
- Data Types.
- Variables.
[Quiz]
- Strings and Variable Interpolation.
[Quiz]
- Expressions.
[Quiz]
Moving On: Simple Statements and Programs.
- Basics: comments, execution model, etc.
- Printing Output.
- Reading Input.
- Decisions.
- Looping.
Really Moving On: Advanced Features
OK - now the gloves come off. Here we introduce the scary stuff that
makes Perl what it is -- the Swiss Army chainsaw of programming
languages.
- Patterns and Regular Expressions.
- Optional Variables and Other Shortcuts.
-- NMH,
Mon Feb 6 15:02:22 EST 1995