Back to FAQS.ORG
Picking Up Perl
A Tutorial Book for New Perl Programmers
0.12th Edition, Covering Perl Version
5.6.0
Feedback and comments are always welcome. Send them to
pup-comments@ebb.org
January 2001
Bradley M. Kuhn
Preface
Purpose of this Book
Acknowledgments
Obtaining the Most Recent Version
Audience
Material Covered
Conventions Used in this Book
Getting Started
A First Perl Program
Expressions, Statements, and Side-Effects
Working with Scalars
Strings
Single-quoted Strings
Special Characters in Single-quoted Strings
Newlines in Single-quoted Strings
Examples of Invalid Single-quoted Strings
A Digression--The print Function
Double-quoted Strings
Interpolation in Double-quoted Strings
Examples of Interpolation
Examples of Interpolation (ASCII Octal Values)
Examples of Interpolation (ASCII Hex Values)
Characters Requiring Special Consideration
Numbers
Numeric Literals
Printing Numeric Literals
Scalar Variables
Scalar Interpolation
Undefined Variables
Operators
Numerical Operators
Comparison Operators
Auto-Increment and Decrement
String Operators
Assignment with Operators
Output of Scalar Data
Special Variables
Summary of Scalar Operators
Arrays
The Semantics of Arrays
List Literals
Array Variables
Array Variables
Associated Scalars
Manipulating Arrays and Lists
It Slices!
Functions
Arrays as Stacks
Arrays as Queues
The Context--List vs. Scalar
Array Interpolation
Control Structures
Blocks
A Digression--Truth Values
The if/unless Structures
The while/until Structures
The do while/until Structures
The for Structure
The foreach Structure
Associative Arrays (Hashes)
What Is It?
Variables
Literals
Functions
Keys and Values
Each
Slices
Context Considerations
Regular Expressions
The Theory Behind It All
The Simple
Simple Characters
The * Special Character
The . Character
The | Character
Grouping with ()s
The Anchor Characters
Pattern Matching
Regular Expression Shortcuts
Subroutines
Defining Subroutines
Returning Values
Using Arguments
Background of Perl
A Brief History of Perl
Perl as a Natural Language
The Slogans
GNU Free Documentation License
ADDENDUM: How to use this License for your documents
General Index