Synopses & Reviews
Perl is a powerful programming language that has grown in popularity since it first appeared in 1988. The first edition of this book, Programming Perl, hit the shelves in 1990, and was quickly adopted as the undisputed bible of the language. Since then, Perl has grown with the times, and so has this book.Programming Perl is not just a book about Perl. It is also a unique introduction to the language and its culture, as one might expect only from its authors. Larry Wall is the inventor of Perl, and provides a unique perspective on the evolution of Perl and its future direction. Tom Christiansen was one of the first champions of the language, and lives and breathes the complexities of Perl internals as few other mortals do. Jon Orwant is the editor ofThe Perl Journal, which has brought together the Perl community as a common forum for new developments in Perl.Any Perl book can show the syntax of Perl's functions, but only this one is a comprehensive guide to all the nooks and crannies of the language. Any Perl book can explain typeglobs, pseudohashes, and closures, but only this one shows how they really work. Any Perl book can say that my is faster than local, but only this one explains why. Any Perl book can have a title, but only this book is affectionately known by all Perl programmers as "The Camel."This third edition of Programming Perl has been expanded to cover version 5.6 of this maturing language. New topics include threading, the compiler, Unicode, and other new features that have been added since the previous edition.
This text provides an introduction to the Perl programming language and its culture. This third edition has been expanded to cover Version 5.6 of Perl. New topics include threading, the compiler, and Unicode.
This comprehensive guide gives readers the inside scoop to the nooks and crannies of the language. Expanded to cover version 5.6, new topics of "Programming Perl" include threading, the compiler, Unicode, and other new features that have been added since the previous edition.
Perl programmers increasingly rely on the Web, online help, and other online information sources to cure information pain. Now O'Reilly's Perl CD Bookshelf gives you convenient online access to your favorite books from your CD-ROM drive.The Perl CD Bookshelf contains a powerhouse of O'Reilly Animal Guides. Included are complete, unabridged versions of Perl in a Nutshell; Programming Perl, 2nd Edition; Perl Cookbook;Advanced Perl Programming; Learning Perl; and Learning Perl on Win32 Systems. As a bonus, the hard-copy version of Perl in a Nutshell is also included.Never has it been easier to learn, or look up, what you need to know online. Formatted in HTML, The Perl CD Bookshelf can be accessed with any Web browser. The books are fully searchable and cross-referenced. In addition to individual indexes for each book, a master index for the entire library is provided.
About the Author
Larry Wall originally created Perl while a programmer at Unisys. He now works full time guiding the future development of the language as a researcher and developer at O'Reilly & Associates. Larry is known for his idiosyncratic and thought-provoking approach to programming, as well as for his groundbreaking contributions to the culture of free software programming. He is the principal author of the bestselling Programming Perl, known colloquially as "the Camel book."
Tom Christiansen is a freelance consultant specializing in Perl training and writing. After working for several years for TSR Hobbies (of Dungeons and Dragons fame), he set off for college where he spent a year in Spain and five in America, dabbling in music, linguistics, programming, and some half-dozen different spoken languages. Tom finally escaped UW-Madison with B.A.s in Spanish and computer science and an M.S. in computer science. He then spent five years at Convex as a jack-of-all-trades working on everything from system administration to utility and kernel development, with customer support and training thrown in for good measure. Tom also served two terms on the USENIX Association Board of directors. With over fifteen years' experience in UNIX system administration and programming, Tom presents seminars internationally. Living in the foothills above Boulder, Colorado, surrounded by mule deer, skunks, and the occasional mountain lion and black bear, Tom takes summers off for hiking, hacking, birding, music making, and gaming.
Jon Orwant, a well-known member of the Perl community, founded The Perl Journal and co-authored OReillys bestseller, Programming Perl, 3rd Edition.
Table of Contents
Preface; The Pursuit of Happiness; What's New in This Edition; The Standard Distribution; Online Documentation; Offline Documentation; Additional Resources; Conventions Used in This Book; Acknowledgments; We'd Like to Hear from You; Part I: Overview; Chapter 1: An Overview of Perl; 1.1 Getting Started; 1.2 Natural and Artificial Languages; 1.3 An Average Example; 1.4 Filehandles; 1.5 Operators; 1.6 Control Structures; 1.7 Regular Expressions; 1.8 List Processing; 1.9 What You Don't Know Won't Hurt You (Much); Part II: The Gory Details; Chapter 2: Bits and Pieces; 2.1 Atoms; 2.2 Molecules; 2.3 Built-in Data Types; 2.4 Variables; 2.5 Names; 2.6 Scalar Values; 2.7 Context; 2.8 List Values and Arrays; 2.9 Hashes; 2.10 Typeglobs and Filehandles; 2.11 Input Operators; Chapter 3: Unary and Binary Operators; 3.1 Terms and List Operators (Leftward); 3.2 The Arrow Operator; 3.3 Autoincrement and Autodecrement; 3.4 Exponentiation; 3.5 Ideographic Unary Operators; 3.6 Binding Operators; 3.7 Multiplicative Operators; 3.8 Additive Operators; 3.9 Shift Operators; 3.10 Named Unary and File Test Operators; 3.11 Relational Operators; 3.12 Equality Operators; 3.13 Bitwise Operators; 3.14 C-Style Logical (Short-Circuit) Operators; 3.15 Range Operator; 3.16 Conditional Operator; 3.17 Assignment Operators; 3.18 Comma Operators; 3.19 List Operators (Rightward); 3.20 Logical and, or, not, and xor; 3.21 C Operators Missing from Perl; Chapter 4: Statements and Declarations; 4.1 Simple Statements; 4.2 Compound Statements; 4.3 if and unless Statements; 4.4 Loop Statements; 4.5 Bare Blocks; 4.6 goto; 4.7 Global Declarations; 4.8 Scoped Declarations; 4.9 Pragmas; Chapter 5: Pattern Matching; 5.1 The Regular Expression Bestiary; 5.2 Pattern-Matching Operators; 5.3 Metacharacters and Metasymbols; 5.4 Character Classes; 5.5 Quantifiers; 5.6 Positions; 5.7 Capturing and Clustering; 5.8 Alternation; 5.9 Staying in Control; 5.10 Fancy Patterns; Chapter 6: Subroutines; 6.1 Syntax; 6.2 Semantics; 6.3 Passing References; 6.4 Prototypes; 6.5 Subroutine Attributes; Chapter 7: Formats; 7.1 Format Variables; 7.2 Footers; Chapter 8: References; 8.1 What Is a Reference?; 8.2 Creating References; 8.3 Using Hard References; 8.4 Symbolic References; 8.5 Braces, Brackets, and Quoting; Chapter 9: Data Structures; 9.1 Arrays of Arrays; 9.2 Hashes of Arrays; 9.3 Arrays of Hashes; 9.4 Hashes of Hashes; 9.5 Hashes of Functions; 9.6 More Elaborate Records; 9.7 Saving Data Structures; Chapter 10: Packages; 10.1 Symbol Tables; 10.2 Autoloading; Chapter 11: Modules; 11.1 Using Modules; 11.2 Creating Modules; 11.3 Overriding Built-in Functions; Chapter 12: Objects; 12.1 Brief Refresher on Object-Oriented Lingo; 12.2 Perl's Object System; 12.3 Method Invocation; 12.4 Object Construction; 12.5 Class Inheritance; 12.6 Instance Destructors; 12.7 Managing Instance Data; 12.8 Managing Class Data; 12.9 Summary; Chapter 13: Overloading; 13.1 The overload Pragma; 13.2 Overload Handlers; 13.3 Overloadable Operators; 13.4 The Copy Constructor (=); 13.5 When an Overload Handler Is Missing (nomethod and fallback); 13.6 Overloading Constants; 13.7 Public Overload Functions; 13.8 Inheritance and Overloading; 13.9 Run-Time Overloading; 13.10 Overloading Diagnostics; Chapter 14: Tied Variables; 14.1 Tying Scalars; 14.2 Tying Arrays; 14.3 Tying Hashes; 14.4 Tying Filehandles; 14.5 A Subtle Untying Trap; 14.6 Tie Modules on CPAN; Part III: Perl as Technology; Chapter 15: Unicode; 15.1 Building Character; 15.2 Effects of Character Semantics; 15.3 Caveats; Chapter 16: Interprocess Communication; 16.1 Signals; 16.2 Files; 16.3 Pipes; 16.4 System V IPC; 16.5 Sockets; Chapter 17: Threads; 17.1 The Process Model; 17.2 The Thread Model; Chapter 18: Compiling; 18.1 The Life Cycle of a Perl Program; 18.2 Compiling Your Code; 18.3 Executing Your Code; 18.4 Compiler Backends; 18.5 Code Generators; 18.6 Code Development Tools; 18.7 Avant-Garde Compiler, Retro Interpreter; Chapter 19: The Command-Line Interface; 19.1 Command Processing; 19.2 Environment Variables; Chapter 20: The Perl Debugger; 20.1 Using the Debugger; 20.2 Debugger Commands; 20.3 Debugger Customization; 20.4 Unattended Execution; 20.5 Debugger Support; 20.6 The Perl Profiler; Chapter 21: Internals and Externals; 21.1 How Perl Works; 21.2 Internal Data Types; 21.3 Extending Perl (Using C from Perl); 21.4 Embedding Perl (Using Perl from C); 21.5 The Moral of the Story; Part IV: Perl as Culture; Chapter 22: CPAN; 22.1 The CPAN modules Directory; 22.2 Using CPAN Modules; 22.3 Creating CPAN Modules; Chapter 23: Security; 23.1 Handling Insecure Data; 23.2 Handling Timing Glitches; 23.3 Handling Insecure Code; Chapter 24: Common Practices; 24.1 Common Goofs for Novices; 24.2 Efficiency; 24.3 Programming with Style; 24.4 Fluent Perl; 24.5 Program Generation; Chapter 25: Portable Perl; 25.1 Newlines; 25.2 Endianness and Number Width; 25.3 Files and Filesystems; 25.4 System Interaction; 25.5 Interprocess Communication (IPC); 25.6 External Subroutines (XS); 25.7 Standard Modules; 25.8 Dates and Times; 25.9 Internationalization; 25.10 Style; Chapter 26: Plain Old Documentation; 26.1 Pod in a Nutshell; 26.2 Pod Translators and Modules; 26.3 Writing Your Own Pod Tools; 26.4 Pod Pitfalls; 26.5 Documenting Your Perl Programs; Chapter 27: Perl Culture; 27.1 History Made Practical; 27.2 Perl Poetry; Part V: Reference Material; Chapter 28: Special Names; 28.1 Special Names Grouped by Type; 28.2 Special Variables in Alphabetical Order; Chapter 29: Functions; 29.1 Perl Functions by Category; 29.2 Perl Functions in Alphabetical Order; Chapter 30: The Standard Perl Library; 30.1 Library Science; 30.2 A Tour of the Perl Library; Chapter 31: Pragmatic Modules; 31.1 use attributes; 31.2 use autouse; 31.3 use base; 31.4 use blib; 31.5 use bytes; 31.6 use charnames; 31.7 use constant; 31.8 use diagnostics; 31.9 use fields; 31.10 use filetest; 31.11 use integer; 31.12 use less; 31.13 use lib; 31.14 use locale; 31.15 use open; 31.16 use overload; 31.17 use re; 31.18 use sigtrap; 31.19 use strict; 31.20 use subs; 31.21 use vars; 31.22 use warnings; Chapter 32: Standard Modules; 32.1 Listings by Type; 32.2 Benchmark; 32.3 Carp; 32.4 CGI; 32.5 CGI::Carp; 32.6 Class::Struct; 32.7 Config; 32.8 CPAN; 32.9 Cwd; 32.10 Data::Dumper; 32.11 DB_File; 32.12 Dumpvalue; 32.13 English; 32.14 Errno; 32.15 Exporter; 32.16 Fatal; 32.17 Fcntl; 32.18 File::Basename; 32.19 File::Compare; 32.20 File::Copy; 32.21 File::Find; 32.22 File::Glob; 32.23 File::Spec; 32.24 File::stat; 32.25 File::Temp; 32.26 FileHandle; 32.27 Getopt::Long; 32.28 Getopt::Std; 32.29 IO::Socket; 32.30 IPC::Open2; 32.31 IPC::Open3; 32.32 Math::BigInt; 32.33 Math::Complex; 32.34 Math::Trig; 32.35 Net::hostent; 32.36 POSIX; 32.37 Safe; 32.38 Socket; 32.39 Symbol; 32.40 Sys::Hostname; 32.41 Sys::Syslog; 32.42 Term::Cap; 32.43 Text::Wrap; 32.44 Time::Local; 32.45 Time::localtime; 32.46 User::grent; 32.47 User::pwent; Chapter 33: Diagnostic Messages; Colophon;