Tuesday, July 19, 2005

Diving into Perl-Infested Waters: Learning Perl

A LLAMA TO START

The Perl programming language is everywhere in the Net; people write code in Perl who've never thought of using any other tool, and programmers with C++ chops still pick Perl to write those little utilities that help them tweak their C code. If you already know how to program in another language, and want to learn Perl, this is the book to learn it from.

The basic Perl reference from O'Reilly is the "camel" book (so-called for the camel picture on its cover), so it's appropriate that Learning Perl should be the "llama" book; the llama is the New World member of the camel family, and the contents of the manual will add new members to the Perl programming family. The fourth edition adds even more footnotes and asides to the exception-rich text.*

Starting with the Introduction, which provides basic background information about Perl and its creator, Larry Wall, the manual walks programmers through the process of adding Perl to their libraries. The authors, Randall L. Schwartz, Tom Phoenix and brian d foy [sic], begin with the basics, and detail ways that Perl differs from other programming languages.

Each chapter concludes with some exercises, because you cannot learn to use a programming language without using it. I liked the estimate of time to complete an exercise, found in parentheses at the start of each one. This let me guess whether I would have time to complete it before I had to put the book down. And since the exercises are "timed" for the Unix version of Perl, and I am using the Windows version, I had a ready-made excuse for taking longer than the estimated time.

According to the authors, "Perl is a language that is easy to use, but hard to learn." This warning is supported by the careful documentation and multiple exceptions to its own internal rules. Fortunately, you don't have learn it on your own; there is a wide-spread support and development community. This "group development," led and coordinated by Perl's creator, keeps the language alive and growing in features (and shrinking in bug-count!), and it means you're not alone out there when you encounter an "undocumented feature" while programming.

And of course, there is also this carefully-designed and well-executed training manual. You start with "scalar data" (variables), and move on to "lists and arrays," "subroutines," and "input and output," before going on to more programmer-intensive topics, like "hashes," "modules," and "regular expressions".** Before you know it, you're learning to use Perl's other control structures; you're doing directory operations, you're sorting strings, and even managing processes††.

The book concludes with some advanced techniques, to help you put your new-found skills to work. Answers to exercises that left development to the reader are included in one appendix, and a list of other sources and training is in another appendix. The rich index is very helpful.

This is a book from the heady times when all it took to get a better job was to learn more. If you still live in that era, I can't recommend it strongly enough. You can learn Perl. You just need this book, and the determination to use it.


* Because Perl is a language rich in exceptions, it's a rare page of the book that doesn't have at least one footnote. The authors even "discussed doing the entire book as a footnote to save on the page-count...." Some of the foototes are jokes, and some explain the punchlines of in-jokes in the text, but most simply expand on, or detail exceptions to, the examples given in the main text.

For one thing, there are no integer operations in Perl; all computations use floating-point values. If you assign a variable an integer value, Perl uses its floating-point equivalent.

There are versions of Perl readily available for Unix, Linux, Windows, Mac, and even OS/2.

** Regular expressions are tiny programs in their own right, according to the authors. Several chapters teach this language-within-a-language, and how to use Perl's powerful support for regular expressions. (Search engines on the Web are often written in Perl because it strongly supports the "pattern matching" or "template" function of regular expressions.)

††If you're in the Unix world, you're managing processes using "fork"—but not in Windows, unless I missed something. According to the authors, Perl developers are working hard to add forking capabilities for systems "whose underlying process model is very different from Unix" to the language.
0596101058,0596004567,0596100922,0596001738,0596000278,1565926994,1565924193


Please join us at BlogCritics to comment on this review.

4 Comments:

Anonymous Anonymous said...

Free Online Paid Surveys
Paid Surveys - Paid Surveys
Paid Surveys - Learn More
Paid Surveys - Blog
Paid Surveys - FAQs
Paid Surveys - Site Map

4/05/2008 11:10 AM  
Blogger Demon said...

Perl is the best scripting language for Text processing and handle regex. I have posted few articles related to those at my blog

http://icfun.blogspot.com/search/label/perl

Also Perl's Cpan has lots of support that I don't even need to think extra while developing project. I didn't find such help on other programming language except Java and .NET

4/04/2009 6:33 AM  
Anonymous Anonymous said...

Poker Freerolls & Poker Passwords Posted Daily. no deposit bonuses ... Tournament Name: Freeroll
Bonus password free sponsor
Facebook Poker Password Hack Free Download, Collection of Facebook Poker Password Coupon Code
online cash no deposit poker portal free money rules sponsors and password play poker free
bankroll Poker Bonus $25 Free 5 Free Poker Books. Bonus code
bonusy
poker-club free roll password. hello all im looking for the poker-club
za darmo poker internetowy Titan Poker Guide - $50 FREE - bonus code: ip50gratis - Exclusive weekly freerolls
bonuses without deposit no requirment bonuses without deposit
no deposit bonuses
no deposit Forgot Your Password? login: pass: Remember me betmost

6/04/2009 12:21 PM  
Blogger samraat said...

sangambayard-c-m.com

4/03/2010 10:47 PM  

Post a Comment

<< Home