At a Glance
In your first chapters of teaching yourself Perl, you'll learn enough
of the basics to write many useful Perl programs. Although some
experience in using a programming language will be an advantage
as you read this guide, it is not required. In particular, you
don't need to know the C programming language before you read
To use this guide effectively, you should be able to try out some
of the features of Perl as you learn them. To do this, you should
have Perl running on your system. If you don't have Perl, Chapter
1, "Getting Started," tells how you can get it for free.
Each chapter of this guide contains quiz and exercise questions
that test you on the material covered in the Chapter's lesson. These
questions are answered in Appendix A, "Answers."
The first chapters covers the essentials of Perl. Here's a summary
of what you'll learn.
Chapter 1, "Getting Started," tells you how to get Perl,
how to run Perl programs, and how to read input from your keyboard
and write output to your screen.
Chapter 2, "Basic Operators and Control Flow," teaches you
about simple arithmetic, how to assign a value to a scalar variable,
and how to control execution using conditional statements.
Chapter 3, "Understanding Scalar Values," teaches you about
integers, floating-point numbers, and character strings. It also
shows you that all three are interchangeable in Perl.
Chapter 4, "More Operators," tells you all about operators
and expressions in Perl and talks about operator associativity
Chapter 5, "Lists and Array Variables," introduces you to
lists, which are collections of values, and to array variables,
which store lists.
Chapter 6, "Reading from and Writing to Files," tells you
how to interact with your file system by reading from input files,
writing to output files, and testing for particular file attributes.
Finally, Chapter 7, "Pattern Matching," describes pattern
matching in Perl and shows how you can substitute values and translate
sets of characters in text strings.
This is quite a bit of material to learn in couple of chapters; however,
by the end of the next chapters you'll know most of the essentials of Perl
and will be able to write many useful programs.