Getting Started
Introduction
Perl IDEs
History
Advice
Tools
Mini-Tutorial
Tutorial
Code Snippets

Resources
Top Sites
More Tutorials
Books
Magazines
Articles
NewsLetters
Mailing Lists
NewsGroups
Forums
User Groups
Talk Shows
Blogs
Clothing

GBIC >> Perl >> Advice >> Getting Started

Advice for Beginners - Getting Started
I get the same question over and over, "How do I get started in Perl?". This section provides a "cookbook" set of instructions and tips which should provide the answer for this question!

  • Getting Started
    A step-by-step process for getting, and learning, Perl. If you're a beginning programmer and aren't quite sure how to get started, just follow these 6 steps to get comfortable with your new role as a programmer.

  • Programming Focus Areas
    You'll be surprised to learned see that technical matters are not always the key to productivity. Follow these 8 rules to take you to the next level of programming.

Getting Started with Perl
These are my suggestions on the key steps you need to take to get started in Perl - a step-by-step recipe to understanding the language.

  • Step 1. Free Copy
    Perl is an open source programming language, available at no charge. You can get it from several sources, but my recommendation is the ActivePerl distribution from ActiveState.

  • Step 2. Online Tutorials

    The documentation that is released with the Perl installation file is great for reference use, but is not designed for beginners. There are also several books on the market (I'll get to those in a few paragraphs) which are significantly better.

    I recommend that beginners start with a short, online tutorial. The benefit of such short tutorials is that you get exposed to the basics without being overwhelmed by more detailed, complex learning sources.

    When I was learning Perl I read over 50 online tutorials, thinking that each might give me some insight that the other tutorials failed to provide. What I found was that most of the tutorials covered some, but not all of the questions that would confuse a beginner - which is the primary reason I wrote my own tutorial.

    A very few of the tutorials did, however, cover beginning Perl adequately for me to include them in the following recommendation:

    I suggest that you read all of these - front to back - and don't skip pages. Type in all the examples and run them until you understand them. Save what you type in for later use. These beginner tutorials have some very basic code which you will use over and over again.

    Once you've read the tutorials, read them again. You'll be surprised at how much information you pick up with each re-reading. I found that by the time I read it a third time, including printing it out and using a high-lighter on the text for key sections, that I had pretty much absorbed all that the tutorial had to offer.

  • Step 3. Know Your Tools

    Imagine hiring a carpenter and when you hand him a hammer he says "What's this for?". You owe it to yourself and your employer to know what Perl tools are available and how to use them.

    Your primary tools are the Perl language statements, HTML coding, UNIX commands and FTP software.

    To help in sorting through the various Perl functions, I've created a Perl Function Summary that groups Perl functions according to the type of task they can perform. Grouping functions this way can really help you fix in your mind what Perl can do in each group.

  • Step 4. Online Scripts

    I've already mentioned that you should type in every line of whichever tutorial or books you chose to use in learning Perl. I suggest that you also go download some short scripts from some of the online sites which offer free scripts. Go through each of the samples line by line. Look for lines of code that you will be able to re-use in your own scripts.

    I suggest my own snippets as a good way to start. When picking out scripts, try to get annotated code to help you understand what the author of the script intended.

  • Step 4. Perl FAQs

    There are about a half dozen Perl FAQs out there. I suggest that you read them all, but not until you've gone through some of the tutorials and have a handle of Perl's capabilities. I've gone through all the FAQs I can find and have found that they have good information but are not focussed on the needs of beginning programmers.

    The more you know about Perl before you read the FAQs, the more you'll get from the FAQs. Unfortunately there is no one single FAQ these days, nor are all of them kept current.

  • Step 5. Books

    Online tutorials can only take you so far. They're too short to provide the in-depth discussion that you can find in books. Books not only provide greater depth of coverage, but they provide the ability to take the materials with you - allowing you to read and learn wherever you are - on the road, on a plane, or waiting in the doctor's office.

    Start with these three books, all from O'Reilly:

    • Learning Perl
    • Perl Programming
    • Perl Cookbook

    If you look these over but they're not what you want, be sure to take a look at my Perl Books page. It lists about a dozen publishers who offer Perl-related book titles. Many of those are excellent books, but you'll find that the ones form O'Reilly are typically the best sellers.

  • Step 6. Perl Documentation

    Perl comes with thousands of pages of documentation, all for free and installed as parts of the standard installation files - including an HTML version. Spend time wandering around the documentation, paying close attention to the examples.

    Because you can access the content of documentation from the command line, you'll find that this can be the fastest way to look up a syntax that you cannot quite remember.