Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: The best way to start learning Perl?

by Spenser (Friar)
on Dec 12, 2001 at 05:19 UTC ( [id://131134] : note . print w/replies, xml ) Need Help??

in reply to Re: The best way to start learning Perl?
in thread The best way to start learning Perl?

I'm still fairly new to Perl myself.  This is what I'm doing and using:  I'm working through and reworking through merlyn's book Learning Perl (O'Reilly) -- it amazes me how much I missed the first time I read through it, so I'm rereading it.  I also have a copy of O'Reilly's Perl in a Nutshell book for reference and elaboration.  In addition to reading some of the questions and answers posed in the "Seekers of Perl Wisdom" section of this web site, I'm going through every page, every link of the on-line "Tutorials" section of this site.

Let me elaborate further on that and on my reworking of Learning Perl:  each page of the tutorial has explanations and examples of Perl commands.  Also, each primary page has links to other pages describing more command.  For each command, I have been creating a basic, simple perl program to see if I can get the command to work.  As part of this, I have several print statements that print out the results of variables as they are effected by each command.

I am now doing the same thing with Learning Perl book.  I started doing this because after the first read I realized that when I tried to use what I read at work, I fell on my face.  It wasn't until I tried to create something for testing (while not under pressure at work) that I was able to really learn the commands.

The result of all this study and practice is that I think I've just about left the "Newbie" category and have moved into the "Beginner" category.  Also, I've begun to be able to dependably use Perl for my job.

While developing each of these test scripts, incidentally, I make sure that I don't skip anything like documentation, indentation and other layout aspects.  I find this to be good practice for good code writing.  I also add the warning flag to my first line of each program:

#!/usr/bin/perl -w

Also, I add the line near the top to have Perl be tough on me:

use strict;

If you're not good a coming up with your own test program ideas, the Learning Perl book does have exercises at the back of each chapter with answers in the appendix. But, for me, I like to come up with my own ideas and go off on tangents.

Good luck to you NAstyed and be sure to visit this site regularly.

Replies are listed 'Best First'.
Re: Re: The best way to start learning Perl?
by tretin (Friar) on Dec 12, 2001 at 09:03 UTC
    Since I'm about as new to Perl as anyone here, I HIGHLY recommend Learning Perl. Before I bought this book I read a few online tutorials (perlmonks' being one of them) and they all seemed a little over my head, however Learning Perl is a great way to get started.

    He called me Greenhorn and I called him Tony Randall.