-
Chapter 1 Introduction: Becoming a Master
-
What It Means to Be a Master
-
Who Should Read This Book
-
How to Read This Book
-
What Should You Know Already?
-
What I Cover
-
What I Don’t Cover
-
-
Chapter 2 Advanced Regular Expressions
-
References to Regular Expressions
-
Noncapturing Grouping, (?:PATTERN)
-
Readable Regexes, /x and (?#...)
-
Global Matching
-
Lookarounds
-
Deciphering Regular Expressions
-
Final Thoughts
-
Summary
-
Further Reading
-
-
Chapter 3 Secure Programming Techniques
-
Bad Data Can Ruin Your Day
-
Taint Checking
-
Untainting Data
-
List Forms of system and exec
-
Summary
-
Further Reading
-
-
Chapter 4 Debugging Perl
-
Before You Waste Too Much Time
-
The Best Debugger in the World
-
perl5db.pl
-
Alternative Debuggers
-
Other Debuggers
-
Summary
-
Further Reading
-
-
Chapter 5 Profiling Perl
-
Finding the Culprit
-
The General Approach
-
Profiling DBI
-
Devel::DProf
-
Writing My Own Profiler
-
Profiling Test Suites
-
Summary
-
Further Reading
-
-
Chapter 6 Benchmarking Perl
-
Benchmarking Theory
-
Benchmarking Time
-
Comparing Code
-
Don’t Turn Off Your Thinking Cap
-
Memory Use
-
The perlbench Tool
-
Summary
-
Further Reading
-
-
Chapter 7 Cleaning Up Perl
-
Good Style
-
perltidy
-
De-Obfuscation
-
Perl::Critic
-
Summary
-
Further Reading
-
-
Chapter 8 Symbol Tables and Typeglobs
-
Package and Lexical Variables
-
The Symbol Table
-
Summary
-
Further Reading
-
-
Chapter 9 Dynamic Subroutines
-
Subroutines As Data
-
Creating and Replacing Named Subroutines
-
Symbolic References
-
Iterating Through Subroutine Lists
-
Processing Pipelines
-
Method Lists
-
Subroutines As Arguments
-
Autoloaded Methods
-
Hashes As Objects
-
AutoSplit
-
Summary
-
Further Reading
-
-
Chapter 10 Modifying and Jury-Rigging Modules
-
Choosing the Right Solution
-
Replacing Module Parts
-
Subclassing
-
Wrapping Subroutines
-
Summary
-
Further Reading
-
-
Chapter 11 Configuring Perl Programs
-
Things Not to Do
-
Better Ways
-
Command-Line Switches
-
Configuration Files
-
Scripts with a Different Name
-
Interactive and Noninteractive Programs
-
perl’s Config
-
Summary
-
Further Reading
-
-
Chapter 12 Detecting and Reporting Errors
-
Perl Error Basics
-
Reporting Module Errors
-
Exceptions
-
Summary
-
Further Reading
-
-
Chapter 13 Logging
-
Recording Errors and Other Information
-
Log4perl
-
Summary
-
Further Reading
-
-
Chapter 14 Data Persistence
-
Flat Files
-
Storable
-
DBM Files
-
Summary
-
Further Reading
-
-
Chapter 15 Working with Pod
-
The Pod Format
-
Translating Pod
-
Testing Pod
-
Summary
-
Further Reading
-
-
Chapter 16 Working with Bits
-
Binary Numbers
-
Bit Operators
-
Bit Vectors
-
The vec Function
-
Keeping Track of Things
-
Summary
-
Further Reading
-
-
Chapter 17 The Magic of Tied Variables
-
They Look Like Normal Variables
-
At the User Level
-
Behind the Curtain
-
Scalars
-
Arrays
-
Hashes
-
Filehandles
-
Summary
-
Further Reading
-
-
Chapter 18 Modules As Programs
-
The main Thing
-
Backing Up
-
Who’s Calling?
-
Testing the Program
-
Distributing the Programs
-
Summary
-
Further Reading
-
-
Appendix Further Reading
-
Perl Books
-
Non-Perl Books
-
-
Appendix brian’s Guide to Solving Any Perl Problem
-
My Philosophy of Problem-Solving
-
My Method
-
-
Colophon
- Title:
- Mastering Perl
- By:
- brian d foy
- Foreword By:
- Randal L. Schwartz
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- July 2007
- Ebook Release:
- February 2009
- Pages:
- 352
- Print ISBN:
- 978-0-596-52724-2
- | ISBN 10:
- 0-596-52724-1
- Ebook ISBN:
- 978-0-596-10261-6
- | ISBN 10:
- 0-596-10261-5
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 animals on the cover of Mastering Perl are a
vicuña (Vicugna vicugna) mother and her young. Vicuñas
are found in the central Andes Mountains of South America, at altitudes of
4,000 to 5,500 meters. For centuries, the vicuña has been treasured for its
coat of soft, insulating hair that produces some of the finest and rarest
wool on Earth. Vicuña yarns and fabrics can fetch up to $3,000 per
yard.
Vicuñas held a special place among ancient Incan societies. Incans
believed that the animal was the reincarnation of a beautiful maiden who had
received a coat of gold as a reward for succumbing to the advances of a
decrepit and homely king. Every four years, Incans would hold a
chacu, a hunt to trap thousands of vicuñas, shear their
coats, and release them back to the wild. Incan law forbade the killing of
vicuñas, and only members of royalty were allowed to wear garments made from the animal's coat.
Unregulated hunting of vicuñas led to the animal being placed on the
endangered species list in 1974. By that time, their number had dwindled to
6,000. However, close regulation, particularly by the government of Peru,
has led to the vicuña's resurgence, and today the number is over 120,000.
The chacu is now sanctioned and regulated by the
Peruvian government, and a portion of the profits is returned to villagers
in the Andes.
The cover image is a 19th-century engraving from the Dover Pictorial Archive. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.
