Picking Up Perl
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
o Purpose of this Book
o Acknowledgments
o Obtaining the Most Recent Version
o Audience
o Material Covered
o Conventions Used in this Book
* Getting Started
o A First Perl Program
o Expressions, Statements, and Side-Effects
* Working with Scalars
o 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
o Numbers
+ Numeric Literals
# Printing Numeric Literals
o Scalar Variables
+ Scalar Interpolation
+ Undefined Variables
o Operators
+ Numerical Operators
+ Comparison Operators
+ Auto-Increment and Decrement
+ String Operators
+ Assignment with Operators
o Output of Scalar Data
o Special Variables
o Summary of Scalar Operators
* Arrays
o The Semantics of Arrays
o List Literals
o Array Variables
+ Array Variables
+ Associated Scalars
o Manipulating Arrays and Lists
+ It Slices!
+ Functions
# Arrays as Stacks
# Arrays as Queues
+ The Context–List vs. Scalar
+ Array Interpolation
* Control Structures
o Blocks
o A Digression–Truth Values
o The if/unless Structures
o The while/until Structures
o The do while/until Structures
o The for Structure
o The foreach Structure
* Associative Arrays (Hashes)
o What Is It?
o Variables
o Literals
o Functions
+ Keys and Values
+ Each
o Slices
o Context Considerations
* Regular Expressions
o The Theory Behind It All
o The Simple
+ Simple Characters
+ The * Special Character
+ The . Character
+ The | Character
+ Grouping with ()s
+ The Anchor Characters
o Pattern Matching
o Regular Expression Shortcuts
* Subroutines
o Defining Subroutines
o Returning Values
o Using Arguments
* Background of Perl
o A Brief History of Perl
o Perl as a Natural Language
o The Slogans
* GNU Free Documentation License
o ADDENDUM: How to use this License for your documents
* General Index
This document was generated on 9 January 2001 using texi2html 1.56k.