Slashdot Mirror


Review:Perl in a Nutshell

Andrew Gardner has reviewed a book that I'm sure sits on many shelves: Perl in a Nutshell. Designed to be your desktop reference, Ellen Siever, Stephen Spainhour, and Nathan Patwardhan have produced a multi-use tool. Click below for the review. Perl in a Nutshell author Ellen Siever, Stephen Spainhour, Nathan Patwardhan pages publisher O'Reilly & Associates rating 10 reviewer Andrew Gardner ISBN summary ood reference for the Perl monger, a good way for the experienced programmer to start getting work done in Perl Here's The Scenario

It is every nerd's righteous duty to learn to hack in Perl. And not just hack, but obfuscate, and do it well. Its a prerequisite for database interfaces, CGI, and system administration, and engineers use Perl all the time. So, figuring it was time to establish my Official Nerd status and get some work done, I set out for the book store. After wading through the piles of books on prognostications about the future of the internet and the 17 volume How to Use AOL series, I found Perl in a Nutshell. I'd done a little Perl before (certainly nothing that would qualify me as a hacker), but I've spent enough time in front of a computer staring into an Emacs buffer full of Verilog to feel like an experienced geek. I didn't want my hand held, and I didn't want a book aimed at the "Netscape for Idiots" crowd. I just wanted to start doing stuff in Perl.

What you get Just as the subtitle states, this is A Desktop Quick Reference. Right from the start, the assumption is that you are going to do something of value very quicky with the knowledge that you are acquiring. Accompanying the exhaustive list of functions, the description of the goals and functionality of each module keeps the book narrowly focused on what Perl can do for you, and what you can be doing with Perl right now. A significant portion of the book is devoted to the most popular modules available on CPAN, which greatly expands the scope of things you can do with this book. The descriptions of the entire broad spectrum of Perl that the book covers are all written in the same style. A quick introduction develops the purpose of the module, and then its straight into the function reference. There is very little fooling around here, and that's the best reason to buy this book.

A brief list of the most useful topics:
  • Basic language reference (reserved words and standard modules)
  • CGI and mod_perl
  • Database interfaces
  • Sockets and network programming
  • Perl/Tk
The introduction to Perl in the first four chapters is sufficient for the experienced coder, and the function reference makes it simple to jumpstart projects in Perl. Unlike some technical books whose indices and tables of contents are as nondescript as physically possible, Perl in a Nutshell actually has a useful index and table of contents that makes it rather simple to find what you're looking for. Should you buy this book?

Perl in a Nutshell is a perfect book for its market. If you're an inexperienced programmer, or you have no use for Perl, this book will do nothing for you. If you want to get started in Perl, the authors suggest Programming Perl, which is the definitive work on the subject. That really is the place to start. If, however, you have the Camel or the Llama or the Ram, then the Camel head, as the preface names it, might just be a welcome addition to your Perl library.

So What's In It For Me?

You don't get tons of code. And it's short on philosophy. You get a reference, and you get what you paid for. So, when you're desperate to get it to work, or you've got a couple of hours to pull something out of thin air, this is the book you want on your desk because it is truly a complete reference.

Purchase this book over at Amazon.

Table of Contents
  1. Introduction to Perl
  2. Installing Perl
  3. The Perl Interpreter
  4. The Perl Language
  5. Function Reference
  6. Debugging
  7. Packages, Modules, and Objects
  8. Standard Modules
  9. CGI Overview
  10. The CGI.pm Module
  11. Web Server Programming with mod_perl
  12. Databases and Perl
  13. Sockets
  14. Email Connectivity
  15. Usenet News
  16. FTP
  17. The LWP Library
  18. Perl/TK
  19. Win32 Modules and Extensions
  20. PerlScript

35 comments

  1. Re:Hmmmm... by Anonymous Coward · · Score: 0

    --Does this book offer that much more than the standard perl docs?--

    Not really, sometimes you even get more from the docs.

    What the perldocs dont have is that fancy camel cover and they are not something you can comfortably read while at the bathroom and such.

  2. Cool! by Anonymous Coward · · Score: 0

    I ordered Perl in a Nutshell from Amazon a couple days ago - my brother recommended it to me.

    I'm not a complete Perl newbie, I can hack out a script or two - but I'm definitely not an expert :).

    I've heard a lot about this book - finally I'll get to see how good it really is :).

  3. Barnes & Noble and this book by Anonymous Coward · · Score: 0

    Perl in a Nutshell is one of the few computer books I do own (I prefer to get most of my docs online). Funny thing about when I bought it at Barnes & Noble: The guy behind the counter saw that this small, thin book was $8 and snickered and wondered how a book so tiny could possibly worth $8. I felt like reaching behind the counter, smacking him hard and shouting, "Don't you EVER disrespect an O'Reilly book!!"
    :)

  4. Oops...my mistake by Anonymous Coward · · Score: 0

    Yeah, now that I'm at home I look at it: Perl 5 Desktop Reference...but it is "A Nutshell Handbook"...:)

  5. Re:Useful, but not required by Anonymous Coward · · Score: 0

    > Still to this day, all you need is Programming Perl

    Not a hope ! The original book is a _terrible_ piece of writing, and it's showing its age badly. The only part of it I still refer to is the dog-eared quickref card. My main daily ref is the man pages.

    Also, Perl has moved on an awful lot since the start - where are the docs on modular Perl in the original texts ?

    I write Perl under NT - there's a lot of Windows arcana that isn't in most of the texts. If Nutshell lists that too, then I'm having it.

  6. Re:Perl Reference Books by Anonymous Coward · · Score: 0

    Ok, I will admit I am addicted to perl books, especially glorious O'Reilly stuff.

    I have learning perl, a great intro.

    Programming perl. This is the bible and I love it because it so detailed and right on.

    Perl Cookbook. I just got this one, but I wished I had gotten it earlier because it has lots of useful examples that I could have poured directly into my code and would have saved me a great deal of time.

    Perl Core Language. I've never heard anyone mention this one, but it is a great book. I go back to it again and again because it is organized so well and its so easy to flip through a section just to see what is available when I don't quite know exactly what I'm looking for.

    Perl in a Nutshell. Haven't gotten much use out of this one yet. Seems a little inaccessible compared to some others I have.

    Mastering Regular Expressions. I do a lot of parsing and this is a MUST OWN as far as I'm concerned.

    Advanced Perl Programming. Haven't delved into this one much yet. Haven't needed to. But looks like good stuff and I'm sure I will need the info eventually.

    Web Client Programming. Great of creating web agents and the like. I have gotten a lot of use out of this one!

    Perl and CGI For the World Wide Web. Well, they can't all be great! I wish I could get my money back!!

  7. Save a Camel, Snatch a Ram by Anonymous Coward · · Score: 0

    Is the Camel book essential if you know how
    to use the man program to read online docs?
    I find that the Ram book (Larry Wall's wonderful Perl Cookbook) is much more useful. Its full
    of examples, code, explanations, codes, philosophy, and code. Did I mention it has a lot of code?

    1. Re:Save a Camel, Snatch a Ram by Anonymous Coward · · Score: 0

      Except that the Ram was written by tchrist, not Larry.

  8. Useful, but not required by Anonymous Coward · · Score: 4

    Still to this day, all you need is Programming Perl. Nonetheless, having a good digest is useful if for nothing more than brushing up on your fundamentals now and then.

    1. Re:Useful, but not required by robay · · Score: 2

      I mostly agree, but Programming Perl has too many words and pages to flip. Perl in a nutshell is faster to find stuff.

  9. You must mistake me for somebody else... by gavinhall · · Score: 1

    Posted by Brendan Byrd/SineSwiper:

    I AM self-taught, my friend. Been teaching myself languages ever since I was five. School hasn't taught me jack about computers, and I'm not one of those inexperienced college preps that thinks a degree will solve everything.

    And bad code? Yeah, I learned off of Matt Wright's scripts. Now that's some sloppy code. Took me some time to correct the mistakes of his code, but it was a learning experience.
    --
    Brendan Byrd AKA SineSwiper
    Computer techie, PERL master, and all-purpose Internet guru

  10. Bah! I don't need books! by gavinhall · · Score: 2

    Posted by Brendan Byrd/SineSwiper:

    I have two guides:

    man perl
    perldoc -f whatever

    You don't need to buy five different $30 books. The time start reading books to learn computer languages is the time I stop learning computer languages. Just look through some example code like the rest of us!

    --
    Brendan Byrd AKA SineSwiper
    Computer techie, PERL master, and all-purpose Internet guru

    1. Re:Bah! I don't need books! by lomion · · Score: 1

      Sometimes example code isn't enough. And what if your not in front of your computer? Me I prefer books because I can take them with me anywhere. And the Palm documentation..i'd rather buy a $30.00 book and a $300.00 Palm just to have some documentation.

      I've learned alot through looking through code, but reading some books helps too. What you don't get from looking at somone's code is an explanation of what does what and why as you go. I like to know the theory as well as the execution. No sample code will teach you theory.

      Doc's can but they are harder on the eyes for me at least. Sometimes I need to step away from the monitor and a book is a good way to keep learning about it without having to be in front of the monitor.

      --
      this space for rent
  11. Beware: ratings incomparable by kip3f · · Score: 2

    I just wanted to point out that each book review is done by a different person, with a different idea of what they want in a book, what qualifies as a '10', etc. As others have pointed out, the reviewer doesn't really talk about using this book and the standard Perl docs together. As far as introductory Perl books go, IMHO the most important aspect is how well scalar/list context is explained. In all other prog. langs that I can think of, whatever is inside the parens is not affected by whats outside. I don't know how well this book explains this, however.
    --
    Man is most nearly himself when he achieves the seriousness of a child at play.

    --
    ****Gfx Scrollbar Special case hit!!*****
  12. Re:Hmmmm... by Matts · · Score: 1

    What the perldocs dont have is that fancy camel cover and they are not something you can comfortably read while at the bathroom and such.

    No, that's what the Palm version is for :)

    That and the backlight for reading under the covers...


    perl -e 'print scalar reverse q(\)-: ,hacker Perl another Just)'

    --

    Matt. Want XML + Apache + Stylesheets? Get AxKit.
  13. Re:Hmmmm... by Matts · · Score: 1

    Yes, they do:

    perldoc -f functionname
    perldoc -riX any_word
    perldoc -q faq_word

    perl -e 'print scalar reverse q(\)-: ,hacker Perl another Just)'

    --

    Matt. Want XML + Apache + Stylesheets? Get AxKit.
  14. Hmmmm... by Matts · · Score: 3

    I remain unconvinced. Tell me how this compares to my 2 current perl references - the Palm pilot Perl Quick Reference (great for quick searches, and keeping a current position), and perldoc. Definitely perldoc is your friend, and I don't know why more people don't use it. Does this book offer that much more than the standard perl docs?

    perl -e 'print scalar reverse q(\)-: ,hacker Perl another Just)'

    --

    Matt. Want XML + Apache + Stylesheets? Get AxKit.
    1. Re:Hmmmm... by cloudmaster · · Score: 1

      The docs don't have a nice index that can find a function if you don't already know what you're looking for though... --Danny, who likes his books

  15. Re:Cheaper at Bookpool by sloth · · Score: 1

    They ship out of Martha's Vineyard. It takes a really long time; my order boards the ferry steamer, crosses Nantucket sound, on a horse to Boston, Perl Cookbook arrives 10 days later. Who's idea was this anyway? Couldn't they have built on the North Slope and saved a couple days?

    Great prices, though. Can't argue with that!

  16. Shelves? We don' need no steenkin' shelves! by Eric+Smith · · Score: 1
    a book that I'm sure sits on many shelves: Perl in a Nutshell.
    Sits on shelves? Heck, I use it too much for it to ever get put on a shelf!
    1. Re:Shelves? We don' need no steenkin' shelves! by Bob9113 · · Score: 1

      Agreed. My copy rarely exceeds 6"
      from the left side of my keyboard.

  17. More real programmer bullshit by LizardKing · · Score: 1

    ``Just look through some example code ...''

    Generally written in a rush just to get the job done. Yeah, a fucking great way of learning a language. Having had to learn way too many badly written systems from the code (``we don't have any documentation here, man'') I can honestly say thank god for books like Stevens `Advanced Programming ...' and its ilk.

    Anyways, I bet you had a college education in computer science. Try being self-taught sometime, and then you'll know the pain of learning from limited sources.




    Chris Wareham

  18. Re:bah by WebDosa · · Score: 1

    Ya callin' me a geek?

    Actually, I did start with "Learning Perl" way back when I started to hack CGI scripts. Then, moved on to "Programming Perl" and "Mastering Regex". Of course, I had to buy the "COOKBOOK" and now the NUTSHELL. Some of you may think I'm crazy but it's not that bad. First of all, I buy my books from BOOKPOOL (I don't work for them) where O'Reilly books are 35% to 45% off list price. Then, all the books I buy are tax-deductible (I have an online business) so I save another 40%. So, if a book costs $100, I'm really only paying $36!!!

    (Ok, ok, so I'm addicted to O'Reilly books...I admit it...)

    --
    Later,

    WebDosa

  19. Re: Sig.... by Yxes · · Score: 1

    I don't believe that sig means what you think it means.

    instead of:
    perl -e 'print scalar reverse q(\)-: ,hacker Perl another Just)'

    try:
    perl -e 'print scalar reverse q(\)-: ,rekcah lreP rehtona tsuJ ) ';
    -----------
    Resume

  20. Re:bookpool by Black+Perl · · Score: 1

    I didn't know about bookpool... yep they even have slightly lower prices than buybooks.com.

    I still like Amazon with its user reviews, etc, but I use fatbrain.com too. Prefer to give my business to the sites that are the most useful to me. But then, I don't buy that many books. Except O'Reillys of course.

    --
    bp
  21. Learning Perl by mathematician · · Score: 1

    I got the book Programming Perl - it is a great book, but not really a good place to start. It is rather like if you didn't know how to play poker, and someone starts to explain it "so black eyed jacks are wild." Before you get started, you need some context, and a gentle tutorial.

    So I got Learning Perl. That, and the downloadable Perl reference, and the Programming Perl, are about all I need (except I also got Perl/Tk so I could do GUI stuff).

    The book on a programming language I liked best was Kernigan and Richie's book on C. It really was a very straightforward book - not much fluff, but starting from the ground up. I really like a linear style in my books, and I find the "post modernist" (if that's what it is) approach to learning can be a little confusing.

  22. My First Perl Book by gom · · Score: 2

    Perl in a Nutshell was my first Perl purchase. It helped me quickly go up the learning curve with Perl. I did find that some areas were just too terse to be useful as an initial learning book. It is the first book that I reach for when I need Perl information.
    _________
    flashcommerce.com

    --
    _________
    dwelr.com
    1. Re:My First Perl Book by Edd · · Score: 1

      Perl in a Nutshell was my first Perl purchase.

      Likewise, I bought it not knowing a thing about perl and a couple of months later I have just written a DB backed messageboard thing (much like /. but strangely different, and less boxy). If you have experience with C and learn best through jumping in off the deep end, or have godd perl knowledge and want a reference book, this is for you.

      --

  23. Sitting right next to it by sporkboy · · Score: 2

    I find that for looking something up FAST then the Camel Head is fine, but if I need all the gritty details there's still no substitute for the full Camel. They both have their purpose.

  24. Re:Barnes & Noble and this book by Edd · · Score: 1

    The guy behind the counter saw that this small, thin book was $8

    Umm, Perl in a nutshell is about 600 pages, and costs about $25. Maybe you are thinking of the desktop quick reference (or something).

    --

  25. bah by Mr.+Tinkertrain · · Score: 1

    get learning perl, it's WAY better...
    then get programming perl and the cookbook. and then the desktop reference... and then mastering regular expressions.....
    and then you become a total geek!!!

    --
    hellraiser ( @linuxfreak.com || @nac.net )
    awk 'BEGIN { printf "Just another %s hacker\n", ARGV[0] }'

    --

    --
    hellraiser ( @linuxfreak.com || @nac.net )
    awk 'BEGIN { printf "Just another %s hacker\n", ARGV[0] }'
  26. Re: Sig.... by EthanW · · Score: 1

    or maybe
    perl -e 'print scalar reverse qw(\)-: hacker Perl another Just)'

  27. I tried to read Perl In A Nutshell... by DonkPunch · · Score: 4

    ...but it was too dark in there.

    --

    Save the whales. Feed the hungry. Free the mallocs.
  28. Cheaper at Bookpool by snowbike · · Score: 1

    Maybe Rob looses the kickback from Amazon (if so, sorry Rob!) But truck on over to bookpool and you can find it for $16.50 vs. Amazon's $19.96. Bookpool is cheaper for most geek books. Still not as cheap as perldoc -f, but if yer gonna buy it...

  29. Perl Reference Books by lamour · · Score: 1

    Where to begin? I liked the first printing of the pink camel book better than later pink printings or any of the blue ones...but of course, it's not very relevant any more. I find the blue camel book to be completely readable, and if you are only going to buy one perl book, this is still the one to have.

    Perl in a Nutshell is a good reference book. I use it more now than I use the blue camel book, just for convenience, but sometimes I need the more complete details that are in the camel book. This is not a "must have" book. It's just another one.

    The book that I found the most useful at explaining tricks and new features in perl 5, was Effective Perl Programming by Joseph Hall. There is some excellent treatment of esoterics in perl in that book. This is not really a very good intro to perl book, but it's a great book.

    I found Learning Perl to be a quick pleasant read. I recommend this to everyone who has NO perl experience, just because, like the K&R C book, you can read it in a day. It's easy to follow.

    The Perl Cookbook is a nice resource to have for finding alternative approaches to solving problems in perl.

    I don't consider the Advanced Perl Programming book to be a must have, but it's useful for finding some details on perl data structures and OO.

    The boxed set is a waste of paper.

    I don't personally use the regexp book, because I don't feel that I need it...I'm told by some friends that I'm wrong. Whatever.

    I personally feel that any perl book which is thicker than my dictionary (like those learn perl in 24 minutes books) just has to be a complete waste of money. This is based on no experience and is totally my own opinion. ;-)

    I've never opened an idiots guide, dummy's guide, utter flaming moron's guide, etc to perl, so I can't speak about any of those either, but...well, you can guess what I think.

    -- Owner of the Virginia license plate "PERL HKR"
    (which doesn't mean I am one, just that I paid money so I could claim it... ;-)