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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

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

Linuxtopia - Picking Up Perl

Preface  
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 ---

Preface

Purpose of this Book  
Acknowledgments  
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  

Strings

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

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  

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  

Numbers

2.2.1 Numeric Literals  

Numeric Literals

2.2.1.1 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

Operators

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

Arrays

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

3.4.2.1 Arrays as Stacks  
3.4.2.2 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  

Functions

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  

Subroutines

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