Perl Cookbook: Tips and Tricks for Perl Programmers
Perl Cookbook: Tips and Tricks for Perl Programmers by Nathan Torkington and Tom Christiansen
- Binding:
- Paperback
- Number of Pages:
- 794
- ISBN:
- 1565922433
- Product Group:
- book
- Publisher:
- O'Reilly Media
- Publication Date:
- Aug. 1, 1998
- BooksForGeeks.com ID:
- 1385
In the world of art, a picture can paint a thousand words. In the world of computing a good example does much the same thing.
The Perl Cookbook is a superb collection of coding snippets which cover all manner of subject areas in a fashion that proves suitable for beginners and established programmers alike. From date formatting and text searching to socket programming and creating Internet services, it's all here and each is a little gem.
Authors Tom Christiansen and Nathan Torkington have done a sterling job of documenting each code snippet through explanatory text and in-line comments which goes a long way to helping the casual user understand what is going on and more importantly, how and why.
As a volume in its own right, the Cookbook is an essential desktop reference for anyone with an interest in programming the language, but combined with O'Reilly's other weighty Perl tomes--Learning Perl, Programming Perl and Advanced Perl Programming--it forms the final piece in one of the most thorough and comprehensive documentation sets for any programming language.
Reviews for Perl Cookbook: Tips and Tricks for Perl Programmers
-
The best book on Perl
Rated out of 5 stars, March 12st, 2009
You'd be forgiven for assuming this book to be an inessential extra for hardcore geeks who just can't get enough of this most geeky of programming languages. However, you'd be wrong: so clearly is it written, so sensibly is it structured, that you could virtually learn Perl from this book alone.
Each chapter focusses on a clearly circumscribed area of syntax (numbers, arrays, pattern matching, modules, etc.), offering a series of "recipes" starting from real basics and going up to more complex tasks. The miracle of this book is that you can home in on whatever information you want within seconds, often without even thinking about it.
There's none of the verbosity or laboured attempts at humour of "Programming Perl": every word here is written with one aim in mind, namely to help you understand the language. -
Doesn't encourage good Perl practice
Rated out of 5 stars, August 12st, 2008
The biggest problem with this book is that none of the examples work when using the warnings flag and the "strict" pragma... if you leave these out when writing Perl, you can very quickly tie yourself in knots trying to work out why your variables are colliding with each other. So, you can either take the lazy approach and leave out warnings and strict (and pay the cost later when you're dealing with a few hundred lines of code), or you can battle away trying to turn their examples into good Perl code that works.
The other problem with this book is... well, the fact that it's a book. This kind of example-heavy manual lends itself far better to an online format, from which example code can be copied & pasted.
Those gripes aside, this is a manual I come back to again and again (although I invested in the CD-based Perl Bookshelf from O'Reilly, which includes this book). The format is excellent, the index is a little weak, but it's generally easy to find what you're looking for. The examples are well explained and I particularly like the way in which multiple solutions are presented for each problem, reflecting the very essence of Perl.
This book is not for beginners though (hint: read the top line of the front cover); for that I recommend you read "Learning Perl" or, better still, get yourself on a beginner course. -
Perl Cookbook
Rated out of 5 stars, September 12th, 2007
This book is an essential collection of code snippets that can be used as a guide when coding applications. In my opinion this book along with Learning Perl are the 2 essential books to have on your desk if you are doing serious stuff with perl -
Evergreen classic
Rated out of 5 stars, July 12th, 2007
Once you've learnt the syntax of a language, you want to learn the idioms, and how it's used most effectively. And given Perl's famous 'There's More The One Way To Do It' motto, you'll need all the help you can get. Perl Cookbook is that help.
Neither a reference nor a tutorial, if you've ever read another cookbook, you'll know what to expect -- after all, this is the daddy of them all. Themed chapters, consisting of short tasks that most people will find handy e.g. trimming white space from a string, or populating a hash. What makes Perl Cookbook so valuable is not just finding out how to do it, but finding out what the most efficient and idiomatic way to do it is. This is where you'll see the Perl way of doing things in action, and it's an immensely valuable learning experience, even if you never need to do exactly any of the things in the book.
For me, the most vital material is the earliest stuff, which takes you through how to use the string, array and hash, the guts of any Perl program. The final half of the book explores Perl's libraries for the use of databases, and a lot of network and web-related stuff, from simple socket programming, to CGI, and the use of mod_perl.
This is a cornucopia of Perl lore, firmly established in the Perl Canon, and deservedly so. You want it on your bookshelf if you want to really call yourself a Perl programmer. -
Not what I had in mind
Rated out of 5 stars, January 12th, 2004
Being a Perl beginner, this book is too hard for me, things I knew and learned I found out on the net.This Book is maybe a must have for people who's work is writing perl applications all day... For me, writing little programs to process text, this book is too hard...
You also need to have unix/linux background.
Maybe I should have bought a beginners book, but I saw the 5 stars and read some reviews the book was very good...
I only recommend this book to advaced programmers.

