CARVIEW |
Learning Perl, Fifth Edition
Making Easy Things Easy and Hard Things Possible
- By
- Randal L. Schwartz, Tom Phoenix, brian d foy
- Publisher:
- O'Reilly Media
- Released:
- June 2008
- Pages:
- 352
Product Editions
- Learning Perl, Fifth Edition - June 2008
- Learning Perl, Fourth Edition - July 2005
- Learning Perl, Third Edition - July 2001
- Learning Perl, Second Edition - July 1997
- Learning Perl - November 1993 (out of print)
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.
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.
This book reflects the combined experience of its authors, who have taught Perl at Stonehenge Consulting since 1991. Years of classroom testing and experience helped shape the book's pace and scope, and this edition is packed with exercises that let you practice the concepts while you follow the text. Topics include:
- Perl data & variable types
- Subroutines
- File operations
- Regular expressions
- String manipulation
- Lists & sorting
- Process management
- Smart matching
- Using third party modules
Perl is the language for people who want to get work done. Originally targeted to sysadmins for heavy-duty text processing, Perl is now a full-featured programming language suitable for almost any task on almost any platform-from short fixes on the command line to web applications, bioinformatics, finance, and much more. Other books may teach you to program in Perl, but this book will turn you into a Perl programmer.
-
Chapter 1 Introduction
-
Questions and Answers
-
What Does “Perl” Stand For?
-
How Can I Get Perl?
-
How Do I Make a Perl Program?
-
A Whirlwind Tour of Perl
-
Exercises
-
-
Chapter 2 Scalar Data
-
Numbers
-
Strings
-
Perl’s Built-in Warnings
-
Scalar Variables
-
Output with print
-
The if Control Structure
-
Getting User Input
-
The chomp Operator
-
The while Control Structure
-
The undef Value
-
The defined Function
-
Exercises
-
-
Chapter 3 Lists and Arrays
-
Accessing Elements of an Array
-
Special Array Indices
-
List Literals
-
List Assignment
-
Interpolating Arrays into Strings
-
The foreach Control Structure
-
Scalar and List Context
-
<STDIN> in List Context
-
Exercises
-
-
Chapter 4 Subroutines
-
Defining a Subroutine
-
Invoking a Subroutine
-
Return Values
-
Arguments
-
Private Variables in Subroutines
-
Variable-Length Parameter Lists
-
Notes on Lexical (my) Variables
-
The use strict Pragma
-
The return Operator
-
Nonscalar Return Values
-
Persistent, Private Variables
-
Exercises
-
-
Chapter 5 Input and Output
-
Input from Standard Input
-
Input from the Diamond Operator
-
The Invocation Arguments
-
Output to Standard Output
-
Formatted Output with printf
-
Filehandles
-
Opening a Filehandle
-
Fatal Errors with die
-
Using Filehandles
-
Reopening a Standard Filehandle
-
Output with say
-
Exercises
-
-
Chapter 6 Hashes
-
What Is a Hash?
-
Hash Element Access
-
Hash Functions
-
Typical Use of a Hash
-
The %ENV hash
-
Exercises
-
-
Chapter 7 In the World of Regular Expressions
-
What Are Regular Expressions?
-
Using Simple Patterns
-
Character Classes
-
Exercises
-
-
Chapter 8 Matching with Regular Expressions
-
Matches with m//
-
Option Modifiers
-
Anchors
-
The Binding Operator, =~
-
Interpolating into Patterns
-
The Match Variables
-
General Quantifiers
-
Precedence
-
A Pattern Test Program
-
Exercises
-
-
Chapter 9 Processing Text with Regular Expressions
-
Substitutions with s///
-
The split Operator
-
The join Function
-
m// in List Context
-
More Powerful Regular Expressions
-
Exercises
-
-
Chapter 10 More Control Structures
-
The unless Control Structure
-
The until Control Structure
-
Expression Modifiers
-
The Naked Block Control Structure
-
The elsif Clause
-
Autoincrement and Autodecrement
-
The for Control Structure
-
Loop Controls
-
The Ternary Operator, ?:
-
Logical Operators
-
Exercises
-
-
Chapter 11 Perl Modules
-
Finding Modules
-
Installing Modules
-
Using Simple Modules
-
Exercise
-
-
Chapter 12 File Tests
-
File Test Operators
-
The stat and lstat Functions
-
The localtime Function
-
Bitwise Operators
-
Exercises
-
-
Chapter 13 Directory Operations
-
Moving Around the Directory Tree
-
Globbing
-
An Alternate Syntax for Globbing
-
Directory Handles
-
Recursive Directory Listing
-
Manipulating Files and Directories
-
Removing Files
-
Renaming Files
-
Links and Files
-
Making and Removing Directories
-
Modifying Permissions
-
Changing Ownership
-
Changing Timestamps
-
Exercises
-
-
Chapter 14 Strings and Sorting
-
Finding a Substring with index
-
Manipulating a Substring with substr
-
Formatting Data with sprintf
-
Advanced Sorting
-
Exercises
-
-
Chapter 15 Smart Matching and given-when
-
The Smart Match Operator
-
Smart Match Precedence
-
The given Statement
-
when with Many Items
-
Exercises
-
-
Chapter 16 Process Management
-
The system Function
-
The exec Function
-
The Environment Variables
-
Using Backquotes to Capture Output
-
Processes as Filehandles
-
Getting Down and Dirty with Fork
-
Sending and Receiving Signals
-
Exercises
-
-
Chapter 17 Some Advanced Perl Techniques
-
Trapping Errors with eval
-
Picking Items from a List with grep
-
Transforming Items from a List with map
-
Unquoted Hash Keys
-
Slices
-
Exercise
-
-
Appendix Exercise Answers
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answer to Exercise
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answers to Exercises
-
Answer to Exercise
-
-
Appendix Beyond the Llama
-
Further Documentation
-
Regular Expressions
-
Packages
-
Extending Perl’s Functionality
-
Some Important Modules
-
Pragmas
-
Databases
-
Other Operators and Functions
-
Mathematics
-
Lists and Arrays
-
Bits and Pieces
-
Formats
-
Networking and IPC
-
Security
-
Debugging
-
The Common Gateway Interface (CGI)
-
Command-Line Options
-
Built-in Variables
-
Syntax Extensions
-
References
-
Tied Variables
-
Operator Overloading
-
Dynamic Loading
-
Embedding
-
Converting Other Languages to Perl
-
Converting find Command Lines to Perl
-
Command-Line Options in Your Programs
-
Embedded Documentation
-
More Ways to Open Filehandles
-
Locales and Unicode
-
Threads and Forking
-
Graphical User Interfaces (GUIs)
-
And More…
-
-
Colophon

- Title:
- Learning Perl, Fifth Edition
- By:
- Randal L. Schwartz, Tom Phoenix, brian d foy
- Publisher:
- O'Reilly Media
- Formats:
-
- 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
-
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. -
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.
-
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.
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.
![]() ©2010, O'Reilly Media, Inc. (707) 827-7000 / (800) 998-9938 All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. |
About O'Reilly
Academic Solutions Authors Contacts Customer Service Jobs Newsletters O'Reilly Labs Press Room Privacy Policy RSS Feeds Terms of Service User Groups Writing for O'Reilly |
Content Archive Business Technology Computer Technology Microsoft Mobile Network Operating System Digital Photography Programming Software Web Web Design |
More O'Reilly Sites
O'Reilly Radar Ignite Tools of Change for Publishing Digital Media Inside iPhone makezine.com craftzine.com hackszine.com perl.com xml.com Partner Sites InsideRIA java.net O'Reilly Insights on Forbes.com |