On Mon, Dec 18, 2006 at 12:04:27PM +0000, Rob Dixon wrote:
> With regard to 'Learning Perl' and 'Learning Perl on Win32 Systems', can 
> anybody
> who has read either or both of these books comment on their usefulness for 
> an
> inexperienced programmer wishing to use Perl on a Windows platform? I have 
> read
> neither but know that Learning Perl is well reputed. It would seem obvious 
> to
> choose the Win32 volume, but I notice that the book is now nearly ten years 
> old.

Skip the Win32 book.  It's old and outdated.  I think its authorship was
mostly a response to the more unix-centric earlier editions of the
Learning Perl book (second edition in particular), though I could be
misremembering the story of its creation.  In any case, Learning Perl
has become a much more platform-agnostic book in later editions, so that
a separate Win32 version is entirely unnecessary.

I have the second edition and my girlfriend has the fourth edition.
Both are excellent books for learning the Perl programming language.  In
fact, I haven't seen another book I'd recommend before this one for
beginners.  The only complaint I have with it is the same complaint I
have with basically every other book, tutorial, et cetera for newbies to
a programming language: it doesn't deal sufficiently with command line
argument parsing, and doesn't deal with it even as much as it does early
enough in the book.

It seems like everyone assumes that all you need to get started learning
a language in terms of input is how to take input in the middle of a
program's execution so you can have your program ask "What's your name?"
and, if you're really lucky, how to read data from a text file.
Learning Perl actually covers more than that (such as some simple
database stuff, and the @ARGV array which is at least a definite step in
the direction of command line argument parsing), but it doesn't get as
far as using the Getopt modules, for instance.

The reason I find this sort of thing important is simple: one generally
cannot cement what one has learned without practice on real-world tasks.
That means, for the beginner Perlist, writing sysadmin tools and the
like that are invoked from the command line or from other scripts where
all the input the program needs can be sent to it via the command line.
This can be difficult to accomplish without knowing how to handle
command line arguments.  Learning Perl does address this issue with
@ARGV at about page 72 or so, which is a good thing, but without
touching on the commonly used modules for command line argument parsing
it leaves the beginner with a bunch of code that will have to be
dramatically changed later if you want it to be more readable, portable,
and "best practices compliant" enough to feel unashamed showing it to
someone else, to say nothing of the difficulty of a complete beginner
writing parsing routines to take arbitrarily ordered command line
arguments.

I've strayed from the main subject a touch.  Back on topic: Learning
Perl is one of the best books ever written, in any edition, for learning
your way around a new programming language.  I recommend it.  Ignore the
Win32 version.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
Ben Franklin: "As we enjoy great Advantages from the Inventions of
others we should be glad of an Opportunity to serve others by any
Invention of ours, and this we should do freely and generously."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to