My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Learning Perl, Second Edition
By
Randal L. Schwartz
,
Tom Christiansen
Foreword by
Larry Wall
July 1997
Pages: 300
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Chapter 1
Introduction
History of Perl
Purpose of Perl
Availability
Basic Concepts
A Stroll Through Perl
Exercise
Chapter 2
Scalar Data
What Is Scalar Data?
Numbers
Strings
Scalar Operators
Scalar Variables
Scalar Operators and Functions
<STDIN> as a Scalar Value
Output with print
The Undefined Value
Exercises
Chapter 3
Arrays and List Data
What Is a List or Array?
Literal Representation
Variables
Array Operators and Functions
Scalar and List Context
<STDIN> as an Array
Variable Interpolation of Arrays
Exercises
Chapter 4
Control Structures
Statement Blocks
The if/unless Statement
The while/until Statement
The for Statement
The foreach Statement
Exercises
Chapter 5
Hashes
What Is a Hash?
Hash Variables
Literal Representation of a Hash
Hash Functions
Hash Slices
Exercises
Chapter 6
Basic I/O
Input from STDIN
Input from the Diamond Operator
Output to STDOUT
Exercises
Chapter 7
Regular Expressions
Concepts About Regular Expressions
Simple Uses of Regular Expressions
Patterns
More on the Matching Operator
Substitutions
The split and join Functions
Exercises
Chapter 8
Functions
Defining a User Function
Invoking a User Function
Return Values
Arguments
Private Variables in Functions
Semiprivate Variables Using local
File-Level my( ) Variables
Exercises
Chapter 9
Miscellaneous Control Structures
The last Statement
The next Statement
The redo Statement
Labeled Blocks
Expression Modifiers
&& and || as Control Structures
Exercises
Chapter 10
Filehandles and File Tests
What Is a Filehandle?
Opening and Closing a Filehandle
A Slight Diversion: die
Using Filehandles
The -x File Tests
The stat and lstat Functions
Exercises
Chapter 11
Formats
What Is a Format?
Defining a Format
Invoking a Format
More About the Fieldholders
The Top-of-Page Format
Changing Defaults for Formats
Exercises
Chapter 12
Directory Access
Moving Around the Directory Tree
Globbing
Directory Handles
Opening and Closing a Directory Handle
Reading a Directory Handle
Exercises
Chapter 13
File and Directory Manipulation
Removing a File
Renaming a File
Creating Alternate Names for a File: Linking
Making and Removing Directories
Modifying Permissions
Modifying Ownership
Modifying Timestamps
Exercises
Chapter 14
Process Management
Using system and exec
Using Backquotes
Using Processes as Filehandles
Using fork
Summary of Process Operations
Sending and Receiving Signals
Exercises
Chapter 15
Other Data Transformation
Finding a Substring
Extracting and Replacing a Substring
Formatting Data with sprintf( )
Advanced Sorting
Transliteration
Exercises
Chapter 16
System Database Access
Getting Password and Group Information
Packing and Unpacking Binary Data
Getting Network Information
Exercise
Chapter 17
User Database Manipulation
DBM Databases and DBM Hashes
Opening and Closing DBM Hashes
Using a DBM Hash
Fixed-Length Random Access Databases
Variable-Length ( Text) Databases
Exercises
Chapter 18
Converting Other Languages to Perl
Converting awk Programs to Perl
Converting sed Programs to Perl
Converting Shell Programs to Perl
Exercise
Chapter 19
CGI Programming
The CGI.pm Module
Your CGI Program in Context
Simplest CGI Program
Passing Parameters via CGI
Less Typing
Form Generation
Other Form Elements
Creating a Guestbook Program
Troubleshooting CGI Programs
Perl and the Web: Beyond CGI Programming
Further Reading
Exercises
Appendix A
Exercise Answers
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Appendix B
Libraries and Modules
Library Terminology
Standard Modules
CPAN: Beyond the Standard Library
Appendix C
Networking Clients
A Simple Client
A Webget Client
An Interactive Client
Further Reading on Networking
Appendix D
Topics We Didn't Mention
Full Interprocess Communications
The Debugger
The Command Line
Other Operators
Many, Many More Functions
Many, Many Predefined Variables
Symbol Table Manipulation with *FRED
Additional Regular-Expression Features
Packages
Embeddible, Extensible
And Other Stuff
Colophon
Return to
Learning Perl