On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com
How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy
[
Top
]
[
Contents
]
[
Index
]
[
?
]
Table of Contents
Preface
Purpose of this Book
Acknowledgments
Obtaining the Most Recent Version
Audience
Material Covered
Conventions Used in this Book
1. Getting Started
1.1 A First Perl Program
1.2 Expressions, Statements, and Side-Effects
2. Working with Scalars
2.1 Strings
2.1.1 Single-quoted Strings
2.1.1.1 Special Characters in Single-quoted Strings
2.1.1.2 Newlines in Single-quoted Strings
2.1.1.3 Examples of Invalid Single-quoted Strings
2.1.2 A Digression--The print Function
2.1.3 Double-quoted Strings
2.1.3.1 Interpolation in Double-quoted Strings
2.1.3.2 Examples of Interpolation
2.1.3.3 Examples of Interpolation (ASCII Octal Values)
2.1.3.4 Examples of Interpolation (ASCII Hex Values)
2.1.3.5 Characters Requiring Special Consideration
2.2 Numbers
2.2.1 Numeric Literals
2.2.1.1 Printing Numeric Literals
2.3 Scalar Variables
2.3.1 Scalar Interpolation
2.3.2 Undefined Variables
2.4 Operators
2.4.1 Numerical Operators
2.4.2 Comparison Operators
2.4.3 Auto-Increment and Decrement
2.4.4 String Operators
2.4.5 Assignment with Operators
2.5 Output of Scalar Data
2.6 Special Variables
2.7 Summary of Scalar Operators
3. Arrays
3.1 The Semantics of Arrays
3.2 List Literals
3.3 Array Variables
3.3.1 Array Variables
3.3.2 Associated Scalars
3.4 Manipulating Arrays and Lists
3.4.1 It Slices!
3.4.2 Functions
3.4.2.1 Arrays as Stacks
3.4.2.2 Arrays as Queues
3.4.3 The Context--List vs. Scalar
3.4.4 Array Interpolation
4. Control Structures
4.1 Blocks
4.2 A Digression--Truth Values
4.3 The if/unless Structures
4.4 The while/until Structures
4.5 The do while/until Structures
4.6 The for Structure
4.7 The foreach Structure
5. Associative Arrays (Hashes)
5.1 What Is It?
5.2 Variables
5.3 Literals
5.4 Functions
5.4.1 Keys and Values
5.4.2 Each
5.5 Slices
5.6 Context Considerations
6. Regular Expressions
6.1 The Theory Behind It All
6.2 The Simple
6.2.1 Simple Characters
6.2.2 The * Special Character
6.2.3 The . Character
6.2.4 The | Character
6.2.5 Grouping with ()s
6.2.6 The Anchor Characters
6.3 Pattern Matching
6.4 Regular Expression Shortcuts
7. Subroutines
7.1 Defining Subroutines
7.2 Returning Values
7.3 Using Arguments
8. Basic Input with Perl
8.1 Reading Input from Standard Input
8.2 STDIN and Redirection
8.3 Input Control using the Diamond Operator
8.4 Input and the Default Variable
9. Perl Output
9.1 Standard Output and the print Operator
9.2 Formatted Output and the printf Operator
9.3 Field Widths with printf
10. Working with Filehandles
10.1 An Overview of Filehandles
10.2 Opening Filehandles
10.3 Reading, Writing and Filehandles
10.4 Closing Filehandles
10.5 Getting File Information
A. Background of Perl
A.1 A Brief History of Perl
A.2 Perl as a Natural Language
A.3 The Slogans
B. GNU Free Documentation License
B.1 ADDENDUM: How to use this License for your documents
General Index
Published under the terms of the GNU General Public License
Design by Interspire
x