Follow Techotopia on Twitter

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
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




[Top] [Contents] [Index] [ ? ]

Linuxtopia - Picking Up Perl

1. Getting Started  
2. Working with Scalars  
3. Arrays  
4. Control Structures  
5. Associative Arrays (Hashes)  
6. Regular Expressions  
7. Subroutines  
A. Background of Perl  
B. GNU Free Documentation License  
General Index  

 -- The Detailed Node Listing ---


Purpose of this Book  
Obtaining the Most Recent Version  
Audience  Who should read this book?
Material Covered  What does this book cover?
Conventions Used in this Book  How do I read this book?

Getting Started

1.1 A First Perl Program  
1.2 Expressions, Statements, and Side-Effects  

Working with Scalars

2.1 Strings  
2.2 Numbers  
2.3 Scalar Variables  
2.4 Operators  
2.5 Output of Scalar Data  
2.6 Special Variables  
2.7 Summary of Scalar Operators  


2.1.1 Single-quoted Strings  
2.1.2 A Digression--The print Function  
2.1.3 Double-quoted Strings  

Single-quoted Strings Special Characters in Single-quoted Strings Newlines in Single-quoted Strings Examples of Invalid Single-quoted Strings  

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  


2.2.1 Numeric Literals  

Numeric Literals Printing Numeric Literals  Using print with numeric literals

Scalar Variables

2.3.1 Scalar Interpolation  Expanding scalar variables in double-quoted strings
2.3.2 Undefined Variables  Before a Variable has a value, It is undefined


2.4.1 Numerical Operators  Operators for numeric scalars
2.4.2 Comparison Operators  Operators to compare scalars with each other
2.4.3 Auto-Increment and Decrement  
2.4.4 String Operators  Operators for string scalars


3.1 The Semantics of Arrays  
3.2 List Literals  
3.3 Array Variables  
3.4 Manipulating Arrays and Lists  

Array Variables

3.3.1 Array Variables  
3.3.2 Associated Scalars  

Manipulating Arrays and Lists

3.4.1 It Slices!  
3.4.2 Functions  
3.4.3 The Context--List vs. Scalar  
3.4.4 Array Interpolation  

Functions Arrays as Stacks Arrays as Queues  

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  

Associative Arrays (Hashes)

5.1 What Is It?  
5.2 Variables  
5.3 Literals  
5.4 Functions  
5.5 Slices  
5.6 Context Considerations  


5.4.1 Keys and Values  
5.4.2 Each  

Regular Expressions

6.1 The Theory Behind It All  
6.2 The Simple  
6.3 Pattern Matching  
6.4 Regular Expression Shortcuts  

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  


7.1 Defining Subroutines  
7.2 Returning Values  
7.3 Using Arguments  

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   

Perl Output

9.1 Standard Output and the print Operator  
9.2 Formatted Output and the printf Operator  
9.3 Field Widths with printf  

Background of Perl

A.1 A Brief History of Perl  
A.2 Perl as a Natural Language  
A.3 The Slogans  

  Published under the terms of the GNU General Public License Design by Interspire