Buying Options
Learning Perl, Third Edition

Save a Tree - Go Digital What is this?

Ebook $27.99
Add to Cart
Safari Books Online
Read Now >

Product Editions

Please consider the latest edition.

  1. Learning Perl, Fifth Edition - June 2008
  2. Learning Perl, Fourth Edition - July 2005
  3. Learning Perl, Third Edition - July 2001
  4. Learning Perl, Second Edition - July 1997
  5. Learning Perl - November 1993 (out of print)
Description

Learning Perl is the quintessential tutorial for the Perl programming language. The third edition has not only been updated to Perl Version 5.6, but has also been rewritten from the ground up to reflect the needs of programmers learning Perl today. Other books may teach you to program in Perl, but this book will turn you into a Perl programmer.

Full Description
Table of Contents
  1. Chapter 1 Introduction

    1. Questions and Answers

    2. What Does "Perl" Stand For?

    3. How Can I Get Perl?

    4. How Do I Make a Perl Program?

    5. A Whirlwind Tour of Perl

    6. Exercises

  2. Chapter 2 Scalar Data

    1. What Is Scalar Data?

    2. Numbers

    3. Strings

    4. Perl's Built-in Warnings

    5. Scalar Variables

    6. Output with print

    7. The if Control Structure

    8. Getting User Input

    9. The chomp Operator

    10. The while Control Structure

    11. The undef Value

    12. The defined Function

    13. Exercises

  3. Chapter 3 Lists and Arrays

    1. Accessing Elements of an Array

    2. Special Array Indices

    3. List Literals

    4. List Assignment

    5. Interpolating Arrays into Strings

    6. The foreach Control Structure

    7. Perl's Favorite Default: $_

    8. Scalar and List Context

    9. <STDIN> in List Context

    10. Exercises

  4. Chapter 4 Subroutines

    1. System and User Functions

    2. Defining a Subroutine

    3. Invoking a Subroutine

    4. Return Values

    5. Arguments

    6. Private Variables in Subroutines

    7. The local Operator

    8. Variable-length Parameter Lists

    9. Notes on Lexical (my) Variables

    10. The use strict Pragma

    11. The return Operator

    12. Exercises

  5. Chapter 5 Hashes

    1. What Is a Hash?

    2. Hash Element Access

    3. Hash Functions

    4. Typical Use of a Hash

    5. Exercises

  6. Chapter 6 I/O Basics

    1. Input from Standard Input

    2. Input from the Diamond Operator

    3. The Invocation Arguments

    4. Output to Standard Output

    5. Formatted Output with printf

    6. Exercises

  7. Chapter 7 Concepts of Regular Expressions

    1. What Are Regular Expressions?

    2. Using Simple Patterns

    3. A Pattern Test Program

    4. Exercises

  8. Chapter 8 More About Regular Expressions

    1. Character Classes

    2. General Quantifiers

    3. Anchors

    4. Memory Parentheses

    5. Precedence

    6. Exercises

  9. Chapter 9 Using Regular Expressions

    1. Matches with m//

    2. Option Modifiers

    3. The Binding Operator, =~

    4. Interpolating into Patterns

    5. The Match Variables

    6. Substitutions with s///

    7. The split Operator

    8. The join Function

    9. Exercises

  10. Chapter 10 More Control Structures

    1. The unless Control Structure

    2. The until Control Structure

    3. Expression Modifiers

    4. The Naked Block Control Structure

    5. The elsif Clause

    6. Autoincrement and Autodecrement

    7. The for Control Structure

    8. Loop Controls

    9. Logical Operators

    10. Exercise

  11. Chapter 11 Filehandles and File Tests

    1. What Is a Filehandle?

    2. Opening a Filehandle

    3. Fatal Errors with die

    4. Using Filehandles

    5. Reopening a Standard Filehandle

    6. File Tests

    7. Exercises

  12. Chapter 12 Directory Operations

    1. Moving Around the Directory Tree

    2. Globbing

    3. An Alternate Syntax for Globbing

    4. Directory Handles

    5. Recursive Directory Listing

    6. Exercises

  13. Chapter 13 Manipulating Files and Directories

    1. Removing Files

    2. Renaming Files

    3. Links and Files

    4. Making and Removing Directories

    5. Modifying Permissions

    6. Changing Ownership

    7. Changing Timestamps

    8. Using Simple Modules

    9. Exercises

  14. Chapter 14 Process Management

    1. The system Function

    2. The exec Function

    3. The Environment Variables

    4. Using Backquotes to Capture Output

    5. Processes as Filehandles

    6. Getting Down and Dirty with Fork

    7. Sending and Receiving Signals

    8. Exercises

  15. Chapter 15 Strings and Sorting

    1. Finding a Substring with index

    2. Manipulating a Substring with substr

    3. Formatting Data with sprintf

    4. Advanced Sorting

    5. Exercises

  16. Chapter 16 Simple Databases

    1. DBM Files and DBM Hashes

    2. Manipulating Data with pack and unpack

    3. Fixed-length Random-access Databases

    4. Variable-length (Text) Databases

    5. Exercises

  17. Chapter 17 Some Advanced Perl Techniques

    1. Trapping Errors with eval

    2. Picking Items from a List with grep

    3. Transforming Items from a List with map

    4. Unquoted Hash Keys

    5. More Powerful Regular Expressions

    6. Slices

    7. Exercise

  1. Appendix A Exercise Answers

    1. Answers to Chapter 2 Exercises

    2. Answers to Chapter 3 Exercises

    3. Answers to Chapter 4 Exercises

    4. Answers to Chapter 5 Exercises

    5. Answers to Chapter 6 Exercises

    6. Answers to Chapter 7 Exercises

    7. Answers to Chapter 8 Exercises

    8. Answers to Chapter 9 Exercises

    9. Answer to Chapter 10 Exercise

    10. Answers to Chapter 11 Exercises

    11. Answers to Chapter 12 Exercises

    12. Answers to Chapter 13 Exercises

    13. Answers to Chapter 14 Exercises

    14. Answers to Chapter 15 Exercises

    15. Answers to Chapter 16 Exercises

    16. Answer to Chapter 17 Exercises

  2. Appendix B Beyond the Llama

    1. Further Documentation

    2. Regular expressions

    3. Packages

    4. Extending Perl's Functionality

    5. Some Important Modules

    6. Pragmas

    7. Databases

    8. Other Operators and Functions

    9. Mathematics

    10. Lists and Arrays

    11. Bits and Pieces

    12. Formats

    13. Networking and IPC

    14. Security

    15. Debugging

    16. The Common Gateway Interface (CGI)

    17. Command-Line Options

    18. Built in Variables

    19. Syntax Extensions

    20. References

    21. Tied Variables

    22. Operator Overloading

    23. Dynamic Loading

    24. Embedding

    25. Converting Other Languages to Perl

    26. Converting find Command Lines to Perl

    27. Command-line Options in Your Programs

    28. Embedded Documentation

    29. More Ways to Open Filehandles

    30. Locales and Unicode

    31. Threads and Forking

    32. Graphical User Interfaces (GUIs)

    33. And More...

  3. Colophon

View Full Table of Contents
Product Details
Title:
Learning Perl, Third Edition
By:
Tom Phoenix, Randal L. Schwartz
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
July 2001
Ebook Release:
February 2009
Pages:
336
Print ISBN:
978-0-596-00132-2
| ISBN 10:
0-596-00132-0
Ebook ISBN:
978-0-596-10336-1
| ISBN 10:
0-596-10336-0
Customer Reviews
About the Authors
  1. Tom Phoenix

    Tom Phoenix has been working in the field of education since 1982. After more than thirteen years of dissections, explosions, work with interesting animals, and high-voltage sparks during his work at a science museum, he started teaching Perl classes for Stonehenge Consulting Services, where he's worked since 1996. Since then, he has traveled to many interesting locations, so you might see him soon at a Perl Mongers' meeting. When he has time, he answers questions on Usenet's comp.lang.perl.misc and comp.lang.perl.moderated newsgroups, and contributes to the development and usefulness of Perl. Besides his work with Perl, Perl hackers, and related topics, Tom spends his time on amateur cryptography and speaking Esperanto. His home is in Portland, Oregon.

    View Tom Phoenix's full profile page.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of Learning Perl, Third Edition, is the llama, a relation of the camel native to the Andean range. Also included in this llamoid group is the domestic alpaca and their wild ancestors, the guanaco and the vicuna. Bones found in ancient human settlements suggest that domestication of the alpaca and llama dates back 4,500 years. In 1531, when Spanish conquistadors overran the Inca Empire in the high Andes, they found both animals present in great numbers. These llamas are suited for high mountain life; their hemoglobin can take in more oxygen than that of other mammals.

Llamas can weigh up to 300 pounds and are mainly used as beasts of burden. A packtrain may contain several hundred animals and can travel up to twenty miles per day. Llamas will carry loads up to fifty pounds, but have a tendency to be short-tempered and resort to spitting and biting to demonstrate displeasure. To the people of the Andes, llamas also provide meat, wool for clothing, hides for leather, and fat for candles. Their wool can also be braided into rope and rugs, and their dried dung is used for fuel. Sarah Jane Shangraw and Ann Schirmer were the production editors for Learning Perl, Third Edition . Nicole Arigo copyedited the text. Sarah Jane Shangraw, Ann Schirmer, and Claire Cloutier provided quality control. Kimo Carter, Claire Cloutier, Ann Schirmer, and Sarah Jane Shangraw did interior page composition. Brenda Miller wrote the index.

Edie Freedman designed the cover of this book. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.

Melanie Wang designed the interior layout based on a series design by Nancy Priest. The text and heading fonts are ITC Garamond Light and Garamond Book; the code font is Constant Willison. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6.

  • Book cover of Learning Perl