Phoenix.pm: Learning Perl

Lowell Hamilton syz at broken-bit.com
Wed Mar 27 09:48:23 CST 2002


I have tried the class approach to learning programming and failed
miserably (but that's probably just me).  In a classroom they teach one
specific way (which goes against much of what perl stands for), and it's
often by a C/C++/java teacher that wants to make perl just an
interpreted version of their language.  

The way learned is I went out and got learning perl and the perl
cookbook and started building something.  Fortunately the company I was
working for was looking for something to build reports and print bills
based on their 50mb/month long distance call report so I had my project
and I just started at it. 

First I learned how to suck in a file and parse it, dump it into a mysql
database.... then (by learning quite a bit of sql) grabbed the numbers I
needed.  Since these were customer calls, I figured out formats,
templates,  and other techniques to print out text reports .. then went
grander and made a output qwest-ish looking bill via postscript.  It
took me forever to build, learning as I went, and had a couple full
rewrites in there after I learned a new feature .. but I did it somehow
without knowing the slighest bit about perl or programming at all.  

The internet is also teeming with example code.  Just a skim through
some programs like formmail or mojomail or sporum can be very
enlightening, even if you don't fully understand what is going on.  If
you hit something you don't know, look it up and see what it's doing. 
Find a tiny regex?...take it apart to see what it does.  While you may
now learn the "proper" or "book" way of coding, you will definately
learn the perl way of coding, and once you have that you can expand on
it (going object oriented and modular, etc)

Basically what I'm saying is that if you don't have something to
actually do with a language, you can sit and booklearn and do little
exersizes in a book or class all day long and not really learn much. 
Find a project you want to do, whether it's a simple CGI program or a
little console application, and dive in with a couple good books at your
side. (learning perl, the cookbook, and programming perl are all your
friends).  

Lowell





On Tue, 2002-03-26 at 23:43, James Durham wrote:
> Lately I have been trying to teach myself perl. Now I am looking for some 
> more formal classes on the subject and was hoping someone could direct me the 
> right way. Any ideas, suggestions or info on this subject would be greatly 
> appreciated.
> 
> 						James Durham
-- 
: Lowell Hamilton     syz at b r o k e n - b i t . c o m :
: Linux  OpenBSD  IDS/firewall  Security  QMail  Perl :




More information about the Phoenix-pm mailing list