Cover image for Programming Perl
Title:
Programming Perl
Author:
Wall, Larry.
Personal Author:
Edition:
Third edition.
Publication Information:
Beijing ; Cambridge [Mass.] : O'Reilly, [2000]

©2000
Physical Description:
xxxi, 1070 pages : illustrations ; 24 cm
General Note:
Includes index.
Language:
English
ISBN:
9780596000271
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Central Library QA76.73.P22 W348 2000 Adult Non-Fiction Central Closed Stacks
Searching...

On Order

Summary

Summary

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 of The 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.


Author Notes

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

Prefacep. xvii
I Overviewp. 1
1 An Overview of Perlp. 3
Getting Startedp. 3
Natural and Artificial Languagesp. 4
An Average Examplep. 17
Filehandlesp. 20
Operatorsp. 22
Control Structuresp. 29
Regular Expressionsp. 35
List Processingp. 41
What You Don't Know Won't Hurt You (Much)p. 43
II The Gory Detailsp. 45
2 Bits and Piecesp. 47
Atomsp. 47
Moleculesp. 49
Built-in Data Typesp. 50
Variablesp. 52
Namesp. 53
Scalar Valuesp. 58
Contextp. 69
List Values and Arraysp. 72
Hashesp. 76
Typeglobs and Filehandlesp. 78
Input Operatorsp. 79
3 Unary and Binary Operatorsp. 86
Terms and List Operators (Leftward)p. 89
The Arrow Operatorp. 90
Autoincrement and Autodecrementp. 91
Exponentiationp. 92
Ideographic Unary Operatorsp. 92
Binding Operatorsp. 93
Multiplicative Operatorsp. 94
Additive Operatorsp. 95
Shift Operatorsp. 95
Named Unary and File Test Operatorsp. 95
Relational Operatorsp. 100
Equality Operatorsp. 101
Bitwise Operatorsp. 101
C-Style Logical (Short-Circuit) Operatorsp. 102
Range Operatorp. 103
Conditional Operatorp. 105
Assignment Operatorsp. 107
Comma Operatorsp. 108
List Operators (Rightward)p. 109
Logical and, or, not, and xorp. 109
C Operators Missing from Perlp. 110
4 Statements and Declarationsp. 111
Simple Statementsp. 111
Compound Statementsp. 113
if and unless Statementsp. 114
Loop Statementsp. 115
Bare Blocksp. 123
gotop. 126
Global Declarationsp. 127
Scoped Declarationsp. 129
Pragmasp. 136
5 Pattern Matchingp. 139
The Regular Expression Bestiaryp. 140
Pattern-Matching Operatorsp. 143
Metacharacters and Metasymbolsp. 158
Character Classesp. 165
Quantifiersp. 176
Positionsp. 178
Capturing and Clusteringp. 182
Alternationp. 187
Staying in Controlp. 188
Fancy Patternsp. 202
6 Subroutinesp. 217
Syntaxp. 217
Semanticsp. 219
Passing Referencesp. 224
Prototypesp. 225
Subroutine Attributesp. 231
7 Formatsp. 234
Format Variablesp. 237
Footersp. 240
8 Referencesp. 242
What Is a Reference?p. 242
Creating Referencesp. 245
Using Hard Referencesp. 251
Symbolic Referencesp. 263
Braces, Brackets, and Quotingp. 264
9 Data Structuresp. 268
Arrays of Arraysp. 268
Hashes of Arraysp. 275
Arrays of Hashesp. 277
Hashes of Hashesp. 279
Hashes of Functionsp. 282
More Elaborate Recordsp. 283
Saving Data Structuresp. 286
10 Packagesp. 288
Symbol Tablesp. 293
Autoloadingp. 296
11 Modulesp. 299
Using Modulesp. 299
Creating Modulesp. 301
Overriding Built-in Functionsp. 306
12 Objectsp. 308
Brief Refresher on Object-Oriented Lingop. 308
Perl's Object Systemp. 310
Method Invocationp. 311
Object Constructionp. 317
Class Inheritancep. 321
Instance Destructorsp. 330
Managing Instance Datap. 331
Managing Class Datap. 343
Summaryp. 346
13 Overloadingp. 347
The overload Pragmap. 348
Overload Handlersp. 349
Overloadable Operatorsp. 350
The Copy Constructor (=)p. 357
When an Overload Handler Is Missing (nomethod and fallback)p. 358
Overloading Constantsp. 359
Public Overload Functionsp. 360
Inheritance and Overloadingp. 361
Run-Time Overloadingp. 361
Overloading Diagnosticsp. 362
14 Tied Variablesp. 363
Tying Scalarsp. 365
Tying Arraysp. 372
Tying Hashesp. 378
Tying Filehandlesp. 384
A Subtle Untying Trapp. 395
Tie Modules on CPANp. 397
III Perl as Technologyp. 399
15 Unicodep. 401
Building Characterp. 402
Effects of Character Semanticsp. 405
Caution, [characters not reproducible] Workingp. 409
16 Interprocess Communicationp. 411
Signalsp. 412
Filesp. 418
Pipesp. 426
System V IPCp. 434
Socketsp. 437
17 Threadsp. 446
The Process Modelp. 447
The Thread Modelp. 448
18 Compilingp. 464
The Life Cycle of a Perl Programp. 465
Compiling Your Codep. 467
Executing Your Codep. 473
Compiler Backendsp. 476
Code Generatorsp. 477
Code Development Toolsp. 479
Avant-Garde Compiler, Retro Interpreterp. 480
19 The Command-Line Interfacep. 486
Command Processingp. 486
Environment Variablesp. 503
20 The Perl Debuggerp. 506
Using the Debuggerp. 507
Debugger Commandsp. 509
Debugger Customizationp. 518
Unattended Executionp. 521
Debugger Supportp. 523
The Perl Profilerp. 525
21 Internals and Externalsp. 530
How Perl Worksp. 531
Internal Data Typesp. 531
Extending Perl (Using C from Perl)p. 532
Embedding Perl (Using Perl from C)p. 538
The Moral of the Storyp. 544
IV Perl as Culturep. 545
22 CPANp. 547
The CPAN modules Directoryp. 548
Using CPAN Modulesp. 551
Creating CPAN Modulesp. 554
23 Securityp. 557
Handling Insecure Datap. 558
Handling Timing Glitchesp. 569
Handling Insecure Codep. 576
24 Common Practicesp. 585
Common Goofs for Novicesp. 585
Efficiencyp. 593
Programming with Stylep. 603
Fluent Perlp. 607
Program Generationp. 616
25 Portable Perlp. 621
Newlinesp. 622
Endianness and Number Widthp. 623
Files and Filesystemsp. 624
System Interactionp. 625
Interprocess Communication (IPC)p. 626
External Subroutines (XS)p. 626
Standard Modulesp. 627
Dates and Timesp. 627
Internationalizationp. 628
Stylep. 628
26 Plain Old Documentationp. 629
Pod in a Nutshellp. 629
Pod Translators and Modulesp. 638
Writing Your Own Pod Toolsp. 640
Pod Pitfallsp. 643
Documenting Your Perl Programsp. 644
27 Perl Culturep. 645
History Made Practicalp. 645
Perl Poetryp. 647
V Reference Materialp. 651
28 Special Namesp. 653
Special Names Grouped by Typep. 653
Special Variables in Alphabetical Orderp. 656
29 Functionsp. 677
Perl Functions by Categoryp. 680
Perl Functions in Alphabetical Orderp. 682
30 The Standard Perl Libraryp. 831
Library Sciencep. 831
A Tour of the Perl Libraryp. 833
31 Pragmatic Modulesp. 836
use attributesp. 837
use autousep. 838
use basep. 839
use blibp. 840
use bytesp. 840
use charnamesp. 841
use constantp. 842
use diagnosticsp. 844
use fieldsp. 846
use filetestp. 848
use integerp. 849
use lessp. 850
use libp. 850
use localep. 852
use openp. 852
use overloadp. 853
use rep. 854
use sigtrapp. 855
use strictp. 858
use subsp. 860
use varsp. 861
use warningsp. 861
32 Standard Modulesp. 865
Listings by Typep. 866
Benchmarkp. 875
Carpp. 878
CGIp. 878
CGI::Carpp. 879
Class::Structp. 879
Configp. 880
CPANp. 881
Cwdp. 881
Data::Dumperp. 882
DB_Filep. 883
Dumpvaluep. 884
Englishp. 884
Errnop. 885
Exporterp. 885
Fatalp. 886
Fcntlp. 887
File::Basenamep. 887
File::Comparep. 888
File::Copyp. 889
File::Findp. 889
File::Globp. 890
File::Specp. 893
File::statp. 894
File::Tempp. 894
FileHandlep. 895
Getopt::Longp. 898
Getopt::Stdp. 899
IO::Socketp. 899
IPC::Open2p. 900
IPC::Open3p. 901
Math::BigIntp. 902
Math::Complexp. 902
Math::Trigp. 903
Net::hostentp. 903
POSIXp. 904
Safep. 906
Socketp. 907
Symbolp. 908
Sys::Hostnamep. 909
Sys::Syslogp. 909
Term::Capp. 911
Text::Wrapp. 911
Time::Localp. 912
Time::localtimep. 912
User::grentp. 913
User::pwentp. 913
33 Diagnostic Messagesp. 916
Glossaryp. 979
Indexp. 1009

Google Preview