[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: good book to learn perl



This is probably more than people wanted to know, but...

>>>>> "N" == aphro  <nate@firetrail.com> writes:
N> can anyone reccomend a good book so i can start the task of learning perl
N> ? :)

N> i have virtually no programming experience, although i have managed to
N> hack some perl scripts up at times.

I agree with others that 'Learning Perl' is the best book for people
with little programming experiencing. Be certain to get the second
edition that has been updated to Perl 5 (which is VERY different from
Perl 4 that the first edition was based on.)

I haven't seen the second edition so I don't know how Randal starts it
off but in case he doesn't or for those who learn from the man pages
or by looking at scripts I will give an unsolicited edict:

!!!! Start every program with !!!!

  #!/usr/local/bin/perl -w

  use strict;
  use diagnostics;

The '-w' turns on warnings. This catches a lot of bad practices before
they become bad habits.

The 'use strict;'  catches a bunch more bad things.

The 'use diagnostics;' provides detailed descriptions of what you
might have done wrong to cause the warning or error, which is great
for learning. But comment out or remove the 'use diagnostics;' before
you put your script into production because it really slows the
program down.

Finally for people that are experienced programmers that want to learn
Perl I would recommend AGAINST "Learning Perl" and recommend 
"Perl: The Programmer's Companion" by Nigel Chapman. For experienced
programmers "Learning Perl" moves very slowly and barely touches
interesting material. "Programmer's Companion" is just the opposite.

HTH and
Hope you have a very nice day, :-)
Tim Ayers (tayers@bridge.com)
Norman, Oklahoma


Reply to: