Effective Perl Programming: Writing Better Programs With Perl Subsequent Edition
| Joseph N. Hall (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
There is a newer edition of this item:
$39.00
(34)
Only 1 left in stock - order soon.
Editorial Reviews
Amazon.com Review
Hall has distilled his years of Perl experience into a book for Perl programmers that is both fluid and fun to read. It's somewhat like reading the Perl FAQ; even when you think you know everything, there's so much you don't know.
Effective Perl Programming has a clear layout: the text is easy on the eyes and the monospaced font makes a clear distinction between backticks and single quotes. Hall uses his PEGS (PErl Graphical Structures) notation to show the difference between Perl's different types of data structures and how everything ties together.
Packed with great examples and code snippets, this book is an excellent source of tips and tricks to make your Perl programs faster and easier to read. You'll also find a strong section on using the Perl debugger to improve your Perl programming skills. In yet another section, Hall walks the reader through the creation of a complete XS module that can boost the performance of array shuffling eight-fold. All in all, this is a great book for programmers who want to move beyond plain, verbose Perl toward a more succinct and powerful coding style.
From Library Journal
Copyright 1998 Reed Business Information, Inc.
From the Inside Flap
I used to write a lot of C and C++. My last major project before stepping into the world of Perl full time was an interpreted language that, among other things, drew diagrams, computed probabilities, and generated entire FrameMaker books. It comprised over 50,000 lines of platform-independent C++, and it had all kinds of interesting internal features. It was a fun project. It also took two years to write.
It seems to me that most interesting projects in C and/or C++ take months or years to complete. But it also seems to me that a whole lot of ideas that start out being mundane and uninteresting become interesting three-month projects when they are expressed in an ordinary high-level language.
This is one of the reasons why I originally became interested in Perl. I had heard that Perl was an excellent scripting language with powerful string handling, regular expression, and process control features. I learned Perl, and learned to like it, when I was thrown into a project in which most of my work involved slinging around text files. I quickly found myself spending hours writing Perl programs that would have taken me days or weeks to write in a different language. Who should read this book
Effective Perl Programming is a book of advice and examples. It derives from my experience as a Perl programmer and--especially--as a Perl instructor. The book is suitable for readers who have a basic understanding of Perl and a few months of practical experience programming in it. Because Effective Perl Programming is a guidebook, not a manual, readers will need access to a comprehensive reference. I recommend either the Perl man pages (freely available in many forms, including Unix man and HTML) or Programming Perl.
Although I use a lot of Unix-derived examples in this book, most of what appears here is not specific to Unix. I thought about including Win32 Perl and MacPerl examples but eventually decided that the book would have more integrity and consistency if it didn't stray from Perl's "native" operating system. I do encourage non-Unix developers to read Effective Perl Programming, or at least to give it a careful look. How and why I wrote this book
I've always wanted to be a writer. In childhood I was obsessed with science fiction. I read constantly, sometimes three paperbacks a day, and every so often, wrote some (bad) stories myself. In 1985, I attended the Clarion Science Fiction Writers' workshop in East Lansing, Michigan. Afterward, I spent a year or so occasionally working on short story manuscripts, but never published any fiction. (Not yet, anyway!)
Later on, when I had settled down into a career in software, I met Randal Schwartz. I hired him as a contractor on an engineering project and worked with him for over a year. Eventually he left to pursue teaching Perl full time. After a while, so did I.
In May 1996, I had a conversation with Keith Wollman at a developer's conference in San Jose. When we drifted onto the topic of Perl, he asked me what I would think of a book called Effective Perl. I liked the idea. Scott Meyers's Effective C++ was one of my favorite books on C++, and extending the series to cover Perl would obviously be useful. I couldn't get Keith's idea out of my head. With some help from Randal, I worked out a proposal for the book, and Addison-Wesley accepted it.
The rest--well, that was the fun part. I spent many 12-hour days and nights with FrameMaker in front of the computer screen, asked lots of annoying questions on the Perl 5 Porters list, posted many bug reports to the same list, looked through dozens of books and manuals, wrote many, many little snippets of Perl code, and drank many, many cans of Diet Coke and Diet Pepsi. I even had an occasional epiphany as I discovered very basic things about Perl I had never realized I was missing. After a while, a manuscript emerged.
This book is my attempt to share with the rest of you some of the fun and stimulation I experienced while learning the power of Perl. I certainly appreciate you taking the time to read it, and I hope you will find it useful and enjoyable.
Joseph N. Hall
Chandler, Arizona 0201419750P04062001
From the Back Cover
Powerful and flexible, Perl has established itself as a premier programming language, especially as a tool for World Wide Web development, text processing, and system administration. The language features full support for regular expressions, object-oriented modules, network programming, and process management. Perl is extensible and supports modular, cross-platform development.
In Effective Perl Programming, Perl experts Joseph Hall and Randal Schwartz share programming solutions, techniques, pointers, rules of thumb, and the pitfalls to avoid, enabling you to make the most of Perl's power and capabilities.
The authors will help you develop a knack for the right ways to do things. They show you how to solve problems with Perl and how to debug and improve your Perl programs. Offering examples, they help you learn good Perl style. Geared for programmers who have already acquired Perl basics, this book will extend your skill range, providing the tactics and deeper understanding you need to create Perl programs that are more elegant, effective, and succinct. This book also speaks to those who want to become more fluent, expressive, and individualistic Perl programmers.
To help you design and write real-world programs, Effective Perl Programming includes:
- Perl basics
- Idiomatic Perl
- Regular expressions
- Subroutines
- References
- Debugging
- Usage of packages and modules
- Object-oriented programming
- Useful and interesting Perl miscellany
Numerous thought-provoking examples appear throughout the book, highlighting many of the subtleties that make Perl such a fascinating, fun, and powerful language to work with.
0201419750B04062001
About the Author
Joseph N. Hall is a software designer with interests in object-oriented languages, compilers, and graphical user interfaces. He teaches Perl and World Wide Web classes in association with Stonehenge Consulting, a leading provider of Perl Instruction.
0201419750AB04062001
Excerpt. © Reprinted by permission. All rights reserved.
I used to write a lot of C and C++. My last major project before stepping into the world of Perl full time was an interpreted language that, among other things, drew diagrams, computed probabilities, and generated entire FrameMaker books. It comprised over 50,000 lines of platform-independent C++, and it had all kinds of interesting internal features. It was a fun project. It also took two years to write.
It seems to me that most interesting projects in C and/or C++ take months or years to complete. But it also seems to me that a whole lot of ideas that start out being mundane and uninteresting become interesting three-month projects when they are expressed in an ordinary high-level language.
This is one of the reasons why I originally became interested in Perl. I had heard that Perl was an excellent scripting language with powerful string handling, regular expression, and process control features. I learned Perl, and learned to like it, when I was thrown into a project in which most of my work involved slinging around text files. I quickly found myself spending hours writing Perl programs that would have taken me days or weeks to write in a different language.
Who should read this book
Effective Perl Programming is a book of advice and examples. It derives from my experience as a Perl programmer and--especially--as a Perl instructor. The book is suitable for readers who have a basic understanding of Perl and a few months of practical experience programming in it. Because Effective Perl Programming is a guidebook, not a manual, readers will need access to a comprehensive reference. I recommend either the Perl man pages (freely available in many forms, including Unix man and HTML) or Programming Perl.
Although I use a lot of Unix-derived examples in this book, most of what appears here is not specific to Unix. I thought about including Win32 Perl and MacPerl examples but eventually decided that the book would have more integrity and consistency if it didn't stray from Perl's "native" operating system. I do encourage non-Unix developers to read Effective Perl Programming, or at least to give it a careful look.
How and why I wrote this book
I've always wanted to be a writer. In childhood I was obsessed with science fiction. I read constantly, sometimes three paperbacks a day, and every so often, wrote some (bad) stories myself. In 1985, I attended the Clarion Science Fiction Writers' workshop in East Lansing, Michigan. Afterward, I spent a year or so occasionally working on short story manuscripts, but never published any fiction. (Not yet, anyway!)
Later on, when I had settled down into a career in software, I met Randal Schwartz. I hired him as a contractor on an engineering project and worked with him for over a year. Eventually he left to pursue teaching Perl full time. After a while, so did I.
In May 1996, I had a conversation with Keith Wollman at a developer's conference in San Jose. When we drifted onto the topic of Perl, he asked me what I would think of a book called Effective Perl. I liked the idea. Scott Meyers's Effective C++ was one of my favorite books on C++, and extending the series to cover Perl would obviously be useful. I couldn't get Keith's idea out of my head. With some help from Randal, I worked out a proposal for the book, and Addison-Wesley accepted it.
The rest--well, that was the fun part. I spent many 12-hour days and nights with FrameMaker in front of the computer screen, asked lots of annoying questions on the Perl 5 Porters list, posted many bug reports to the same list, looked through dozens of books and manuals, wrote many, many little snippets of Perl code, and drank many, many cans of Diet Coke and Diet Pepsi. I even had an occasional epiphany as I discovered very basic things about Perl I had never realized I was missing. After a while, a manuscript emerged.
This book is my attempt to share with the rest of you some of the fun and stimulation I experienced while learning the power of Perl. I certainly appreciate you taking the time to read it, and I hope you will find it useful and enjoyable.
Joseph N. Hall
Chandler, Arizona
0201419750P04062001
I'd like to read this book on Kindle
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : Addison-Wesley Professional; Subsequent edition (December 1, 1997)
- Language : English
- Paperback : 273 pages
- ISBN-10 : 0201419750
- ISBN-13 : 978-0201419757
- Item Weight : 1.07 pounds
- Dimensions : 7.5 x 0.75 x 9.5 inches
- Best Sellers Rank: #6,325,486 in Books (See Top 100 in Books)
- #329 in Perl Programming
- #1,371 in Object-Oriented Software Design
- #3,611 in Object-Oriented Design
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews right now. Please try again later.
Most tips are no longer than a few pages, and they are neatly organized by topic ("Regular Expressions", "Subroutines", etc.) in the index. Highly recommended for the semi-experienced Perl programmer who is looking to polish their programming skills.
Hats off to the authors for making a unique contribution to the Perl literature.
I just didn't find it very interesting or even that useful. I stopped reading half way through.
The content holds up surprisingly well for 1997. The opening chapters cover a lot of the oddities and gotchas of life with Perl, such as slicing, the various connotations of undef, a persuasive defence of $_ and where + is necessary to disambiguate. The final 'miscellany' chapter also contains useful information in a similar vein. And this also appears to be one of the first books to detail the now famous Schwartzian transform and the Orcish manoeuvre for sorting, so it has a certain historical appeal.
Equally, the chapters on debugging, references, regular expressions and object oriented programming are also pretty good. It's just that there are now several other books that cover these topics. If you only want one book in this style, Perl Best Practices bestrides the field like a colossus, being more comprehensive, and better written. Not that there's anything wrong with the writing here, it's never boring as such, but it does feel flat.
Nonetheless, Effective Perl Programming does the job it sets out to do fairly well, and I find you can never have too much help in explaining the nooks and crannies of idiomatic Perl, so this is still worth getting hold of, particularly because you can find it at an extremely reasonable price.
Admit it, part of the charm of perl is writing some obscure JAPH one-liner, being able to get 'shebang' jokes, and knowing what the heck $$->a->razzle()->dazzle might actually accomplish.
But how to get there? You've probably read the Llama and the Camel. You've probably got some bigh honkin scripts out there doing some heavy lifting. Heck, you may have cobbled a RegEx together that unravels the Necronmicon. All this and yet....
Odds are you came from a C-ish or similar background and you realize that you're still writing C or Java, but in Perl.
This book is the Emerillian kick to the next level. Realizing that languages, Perl especially, have idioms, best practices, standards, Hall acquanints you with them.
Just as children are baffled by "a fork in the road" you may find handy idioms like my ($b) = ($a=~m,(^\w+?),) something you have to look up, or memorize -- but later you'll realize that you *needed that* phrase in order to round out your vocabulary (just like a 'fork in tho road').
Hall also makes good suggestions that will help make your code tighter, helping your banish overuse of globals (impossible for someone else to maintain). He teaches you to document and follow standards.
this book was critical in my development form perl-plateaud and stymied, to perl-proficient.
Thanks Hall!
The reason I don't like the book as much as I thought I would is things are not explained clearly much of the time. Take the chapter on references for example. While the authors include lots of examples, the explanation of how nested references work is just confusing. Granted, this is a nasty concept to grasp, but I expected something clearer. Instead they just say "oh this looks ugly", which is not helpful. BTW, if you are pulling your hair out over references like I am, the Dumper pragma (not the dump function) is extremely helpful. (Unfortunately, it's not mentioned in this book, nor in the camel book).
