Buying Options
Learning Perl, Fifth Edition
Print $39.99
Add to Cart
Print+Ebook $43.99
Add to Cart
Ebook $31.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £30.99
Add to Cart
What is this?

Product Editions

  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, popularly known as "the Llama," is the book most programmers rely on to get started with Perl. The bestselling Perl tutorial since it was first published in 1993, this new fifth edition covers recent changes to the language up to Perl 5.10. Reflecting years of classroom testing and experience, this edition is packed with exercises that let you practice the concepts while you follow the text.
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. Numbers

    2. Strings

    3. Perl’s Built-in Warnings

    4. Scalar Variables

    5. Output with print

    6. The if Control Structure

    7. Getting User Input

    8. The chomp Operator

    9. The while Control Structure

    10. The undef Value

    11. The defined Function

    12. 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. Scalar and List Context

    8. <STDIN> in List Context

    9. Exercises

  4. Chapter 4 Subroutines

    1. Defining a Subroutine

    2. Invoking a Subroutine

    3. Return Values

    4. Arguments

    5. Private Variables in Subroutines

    6. Variable-Length Parameter Lists

    7. Notes on Lexical (my) Variables

    8. The use strict Pragma

    9. The return Operator

    10. Nonscalar Return Values

    11. Persistent, Private Variables

    12. Exercises

  5. Chapter 5 Input and Output

    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. Filehandles

    7. Opening a Filehandle

    8. Fatal Errors with die

    9. Using Filehandles

    10. Reopening a Standard Filehandle

    11. Output with say

    12. Exercises

  6. Chapter 6 Hashes

    1. What Is a Hash?

    2. Hash Element Access

    3. Hash Functions

    4. Typical Use of a Hash

    5. The %ENV hash

    6. Exercises

  7. Chapter 7 In the World of Regular Expressions

    1. What Are Regular Expressions?

    2. Using Simple Patterns

    3. Character Classes

    4. Exercises

  8. Chapter 8 Matching with Regular Expressions

    1. Matches with m//

    2. Option Modifiers

    3. Anchors

    4. The Binding Operator, =~

    5. Interpolating into Patterns

    6. The Match Variables

    7. General Quantifiers

    8. Precedence

    9. A Pattern Test Program

    10. Exercises

  9. Chapter 9 Processing Text with Regular Expressions

    1. Substitutions with s///

    2. The split Operator

    3. The join Function

    4. m// in List Context

    5. More Powerful Regular Expressions

    6. 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. The Ternary Operator, ?:

    10. Logical Operators

    11. Exercises

  11. Chapter 11 Perl Modules

    1. Finding Modules

    2. Installing Modules

    3. Using Simple Modules

    4. Exercise

  12. Chapter 12 File Tests

    1. File Test Operators

    2. The stat and lstat Functions

    3. The localtime Function

    4. Bitwise Operators

    5. Exercises

  13. Chapter 13 Directory Operations

    1. Moving Around the Directory Tree

    2. Globbing

    3. An Alternate Syntax for Globbing

    4. Directory Handles

    5. Recursive Directory Listing

    6. Manipulating Files and Directories

    7. Removing Files

    8. Renaming Files

    9. Links and Files

    10. Making and Removing Directories

    11. Modifying Permissions

    12. Changing Ownership

    13. Changing Timestamps

    14. Exercises

  14. Chapter 14 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

  15. Chapter 15 Smart Matching and given-when

    1. The Smart Match Operator

    2. Smart Match Precedence

    3. The given Statement

    4. when with Many Items

    5. Exercises

  16. Chapter 16 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

  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. Slices

    6. Exercise

  1. Appendix Exercise Answers

    1. Answers to Exercises

    2. Answers to Exercises

    3. Answers to Exercises

    4. Answers to Exercises

    5. Answers to Exercises

    6. Answers to Exercises

    7. Answers to Exercises

    8. Answers to Exercises

    9. Answers to Exercises

    10. Answer to Exercise

    11. Answers to Exercises

    12. Answers to Exercises

    13. Answers to Exercises

    14. Answers to Exercises

    15. Answers to Exercises

    16. Answer to Exercise

  2. Appendix 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, Fifth Edition
By:
Randal L. Schwartz, Tom Phoenix, brian d foy
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
June 2008
Ebook Release:
March 2009
Pages:
352
Print ISBN:
978-0-596-52010-6
| ISBN 10:
0-596-52010-7
Ebook ISBN:
978-0-596-10316-3
| ISBN 10:
0-596-10316-6
Customer Reviews
About the Authors
  1. Randal L. Schwartz

    Randal L. Schwartz is a two-decade veteran of the software industry. He is skilled in software design, system administration, security, technical writing, and training. Randal has coauthored the "must-have" standards: Programming Perl, Learning Perl, Learning Perl for Win32 Systems, and Effective Perl Learning, and is a regular columnist for WebTechniques, PerformanceComputing, SysAdmin, and Linux magazines.

    He is also a frequent contributor to the Perl newsgroups, and has moderated comp.lang.perl.announce since its inception. His offbeat humor and technical mastery have reached legendary proportions worldwide (but he probably started some of those legends himself). Randal's desire to give back to the Perl community inspired him to help create and provide initial funding for The Perl Institute. He is also a founding board member of the Perl Mongers (perl.org), the worldwide Perl grassroots advocacy organization. Since 1985, Randal has owned and operated Stonehenge Consulting Services, Inc. Randal can be reached for comment at merlyn@stonehenge.com or (503) 777-0095, and welcomes questions on Perl and other related topics.

    View Randal L. Schwartz's full profile page.

  2. 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.

  3. brian d foy

    brian d foy has been an instructor for Stonehenge Consulting Services since 1998, a Perl user since he was a physics graduate student, and a die-hard Mac user since he first owned a computer. He founded the first Perl user group, the New York Perl Mongers, as well as the Perl advocacy nonprofit Perl Mongers, Inc., which helped form more than 200 Perl user groups across the globe. He maintains the perlfaq portions of the core Perl documentation, several modules on CPAN, and some stand-alone scripts. He's the publisher of The Perl Review, a magazine devoted to Perl, and is a frequent speaker at conferences including the Perl Conference, Perl University, MarcusEvans BioInformatics '02, and YAPC. His writings on Perl appear in The O'Reilly Network, The Perl Journal, Dr. Dobbs, and The Perl Review, on use.perl.org, and in several Perl usenet groups.

    View brian d foy's full profile page.

Colophon

The animal on the cover of Learning Perl, Fifth Edition is a llama (Lama glama), 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 vicu a. Bones found in ancient human settlements suggest that domestication of the alpaca and the llama dates back about 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 mostly used as beasts of burden. A packtrain may contain several hundred animals and can travel up to 20 miles per day. Llamas will carry loads up to 50 pounds, but have a tendency to be short-tempered and resort to spitting and biting to demonstrate displeasure. To other 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 ropes and rugs, and their dried dung is used for fuel.

  • Book cover of Learning Perl