Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Where and how to start learning Perl

by woolfy (Hermit)
on Aug 15, 2003 at 15:11 UTC ( #284175=perlmeditation: print w/ replies, xml ) Need Help??

This page is in need of an update, I know. It was a lot of work to make this page in the first place, and to update it, is also a lot of work. A lot of new books, websites and other interesting Perl things have appeared, and several things that are mentioned below are no longer available. I will do a major update later this year (this is written in July 2009, while on my way to YAPC::Europe), probably next month. My apologies for any errors in links to non-existing websites. For learning Perl the TMTOWTDI paradigm of Perl applies: there's more than one way to do it. This node contains a description of the where and how to learn Perl. The where concerns the materials: books, magazines and websites that can be used to learn Perl, with enough in there for everybody, from initiate to monk to saint and perhaps even the gods. The how concerns the way to learn Perl: some people like to read a book on paper, others prefer online texts, others want to read just a little and just want to work with scripts and learn from there on. Here are goodies for either type of people.

Categories


Introductions and tutorials     (Top)

Perl Introduction Perldoc.com Online introduction to Perl 5.8

Perl Monks Tutorials Perl Monks The Perl Monks offer a world of knowledge on itself.
Tutorial Categories

Ovid's Web Programming Using Perl Course ovid For those who know a little Perl and a little HTML: a quick and very clear course in using Perl with HTML.

Tachyon's Tutorials tachyon Tutorials about modules, CGI, shell and more.

Cultured Perl One-liners 101
Cultured Perl One-liners 101, part 2
Teodor Zlatanov Tutorials about the Perl command line, file and data operations, and some other interesting stuff. And a beauty about JAPH. Surfing through this IBM site other nice tutorials and articles can be found, e.g. about MakeMaker by Sean Dague.

CGI Programming Dave Cross Tutorial in 3 parts on CGI programming. More interesting info on the website, like columns and articles.

Training manuals Perl Training Australia Perl Training Australia use several tutorials in their courses, and several of those can be downloaded here: Training manuals. On this page you will find links to their online tutorials (pdf files): Introduction to Perl, Intermediate Perl, CGI Programming with Perl, Object Oriented Perl, Database Programming with Perl.

Randal Schwartz's columns Randal Schwartz More than 170 columns on Perl and other subjects by Randal Schwartz in Linux Magazine, Unix Review and WebTechniques Magazine.

O'Reilly's list of tutorials O'Reilly Publishers Overview of dozens of turorials all over the internet.

Perl at WDVL Web Developer's Virtual Library Albeit sometimes the menu structure and the user interface of this website can be confusing and irritating, it contains quite some tutorials, examples and articles about Perl. The WDVL is a website for web developers.

Perl articles informIT/Pearson Several articles about Perl, of which some are (adaptations of) chapters of books.

Books     (Top)

Online Perl Library
Online Perl books
Learn.Perl.Org and Books.Perl.Org Complete books online:
One or more chapters of other books:
Many more lists of books at Books.Perl.Org, for instance, check out the overview of publishers of Perl books.

Safari Bookshelf Perl Books Safari Books Online Several publishers cooperate in Safari Books and present more than 30 Perl books, of which parts of the books are online (every 2 first paragraphs of each section in the book). All can be read completely online for a subscription fee

Learning Perl O'Reilly Publishers The famous Llama Book, by Randal Schwartz (and others, the latest -3rd- edition with Tom Phoenix). Chapter 4, Subroutines can be read online.

O'Reilly Perl CD Bookshelf O'Reilly Publishers 7 Perl books on a CD. Contents not available online but to be bought and read offline. Version 1.0 of The Linux Web Server CD Bookshelf contained 2 other good Perl books: Programming the Perl DBI and CGI Programming with Perl, version 2.0 contains just one good Perl book: Practical mod_perl.

Manning's Perl eBooks Manning Publications 6 eBooks, contents not available online but to be bought and read offline.

Perl books at Addison-Wesley Addison-Wesley 6 books, of which parts of the contents are online available.

Writing Apache Modules with Perl and C O'Reilly Publishers Written by Lincoln Stein and Doug MacEachern. Chapters 6, 7, 8 and 9 are available online. The source code from all chapters is available too. Lots of other interesting stuff can be found on this website, like handouts and slides and demos of Lincoln's Perl tutorials.

CGI programming 101 CGI101.com Written by Jacqueline Hamilton. The first six chapters available online. The source code from the remaining chapters is available too.

CGI programming 201 CGI101.com Developing Web Message Boards and Web Logs. Written by Jacqueline Hamilton. No chapters available online. The source code from all chapters is available though.

Perl and CGI Peachpit Press Perl and CGI for the World Wide Web: Visual QuickStart Guide, Elizabeth Castro's book for beginning Perl programmers. Chapter 7 can be read online.

Perl by Example Prentice Hall Written by Ellie Quigley. Chapter 14 can be read online (it's a PDF file).

Perl & LWP O'Reilly Publishers Written by Sean M. Burke. LWP (Library for WWW in Perl) to let your programs download and extract information from the Web: how to make web requests, submit forms, provide authentication information, using regular expressions, tokens, trees to parse HTML. Chapter 7, HTML Processing with Tokens can be read online.

Perl books at SAMS SAMS Publishing SAMS publishes several Perl books, like Teach Yourself Perl in 21 Days, Teach Yourself Perl in 24 Hours, Perl Developer's Dictionary and mod_perl Developer's Cookbook.

Perl books at Wiley Wiley Publishers Wiley publishes several Perl books, like Perl: The Programmer's Companion, Perl Weekend Crash Course, Perl Database Programming and Custom CGI Scripting with Perl.

Knowledge Centers     (Top)

O'Reilly Perl Center O'Reilly Publishers Resource center with books, news, articles, interviews, success stories, examples and much more.

Perl.com The Source for Perl O'Reilly Publishers Perl community website, launched by Tom Christiansen. Starting place for finding downloads, documentation, FAQ's, news, articles, columns, books and much more. Some overlap with O'Reilly Perl Center.

Perl FAQ Several contributors Frequently Asked Questions about Perl.
Major Topics

mod_perl The Apache Software Foundation Resource center about mod_perl, the fusion of Perl and Apache. News, documentation, tutorials, guides, downloads, articles, links, mailing lists, and a lot more. Take23 is an interesting sister site, even though big parts aren't maintained for quite a while.

Use Perl; Chris Nandor and other Perl community members Extensive Perl community website with news, discussions, announcements, articles, links, listings and a lot more.

The Perl Archive
Perl Horizons
Creative Fundamentals, Inc. The Perl Archive and Perl Horizons are interlinked websites and contain many programs, scripts, a learning center, a discussion forum, articles, book reviews, chapters from books.

Perl Mongers
Association of international Perl User Groups Perl Mongers are the everyday life harbingers of Perl, often organizing all kinds of meetings, often monthly. Another world of knowledge on your doorstep. Really, you can be surprised how close another Monger can be near you.

Documentation     (Top)

Perl Documentation Perldoc.com Online and extensive documentation. Of course, if you have Perl installed on your computer, this documentation is also available offline by using the perldoc command line command.
perldoc perl (displays the listing of docs and describes Perl)
perldoc -f open (displays the documentation for the "open" function)
perldoc -q larry (displays the topics from the FAQs which contain the word "larry")

The Perl Directory Perl.org More online and extensive documentation.

Perl Monks Library Perl Monks Another world of knowledge. A reminder is included that the Perl documentation here is outdated and that one should visit the Perl Documentation website. Nonetheless, this site is very accessible and links are available to corresponding documentation about aspects of Perl for the current version of Perl and to older versions.

Programs, scripts, modules     (Top)

CPAN Comprehensive Perl Archive Network Info and modules ready to use, mostly well-documented. Look here before you start write something yourself. Learn from other people's examples.

CPAN Search and Find Comprehensive Perl Archive Network Search for programs other people already might have written, so you don't have to.

Code Catacombs
Snippets Section
Craft
Perl Monks Scripts in all sizes, full-blown programs and handy bits to use in your own scripts, written and/or made available by fellow Monks. The Code Catacombs are categorized in 17 groups. The Craft and Snippets sections are not yet internally organized in categories, but grinder had made a useful Snippets Index.

O'Reilly books listing O'Reilly Publishers Handy listing of O'Reilly with books on Perl and other languages and other subjects: the list contains a column with links to examples (from books with online available examples).

Other sources and topics     (Top)

Perl Monks FAQ Perl Monks Questions and answers about this website and pointers to a lot of info

comp.lang.perl.announce
comp.lang.perl.misc
Usenet Newsgroups Read, write, discuss, announce, learn... all about Perl.

Perl Mailing List Database
Perl.org Over 250 mailing lists about Perl and related subjects. More than you can read, write, discuss, announce, learn...

The Perl Journal CMP Media LLC Magazine famous with old-time Perl users. Too bad, the archives of the magazine have been moved to a subscibers section for which has to be paid. A lot of the covers are pieces of art, cherished my many Perl Mon(ks|gers). Many of us (I do) have at least one on display in our working environment.

Perl Paraphernalia Mark Jason Dominus Lots of info, and of course the Perl Advanced Techniques Handbook.

links::perl larsen Scripts, links.

Perl Limericks Siegfried Bublitz Scripts, a bit of explanation, links.

Perltraining Gabor Szabo An international list of individuals and organizations teaching Perl.

Organizations     (Top)

YAPC Yet Another Perl Conference Grassroots symposia on Perl under the auspices of YAS. The websites of several YAPC conferences are often quite informative, like slides of talks at YAPC::Europe::2001.

YAS Yet Another Society YAS is a non-profit corporation for the advancement of collaborative efforts in computer and information sciences. Mostly interesting for news (events) and links.

TPF The Perl Foundation Dedicated to the advancement of Perl through open discussion, collaboration, design, and code. TPF coordinates the efforts of numerous grass-roots Perl-based groups including the YAPC Conferences.TPF holds the copyright on Perl 6 and Parrot. TPF is a unit of YAS. Mostly interesting for news and links.

YEF YAPC::Europe Foundation Dedicated provide support for Perl conferences in Europe. YEF works hand in hand with organizers of YAPC::Europe conferences and Perl workshops, on all conference related business. The aim is to provide a focal point, organise on-line registration, mailing lists, technical and conference advice and to generally support activities, encouraging Perl Conferences and Workshops in Europe and environs.

Several ways to learn Perl     (Top)


Several people have asked for the best place or the best way to start learning Perl and others have answered: here, here, here and here. What is very clear is that everybody has their own way they learn something new the best way. If you've got a problem with learning something one way, please try another way, maybe that's a better way.

Ask the monks how they learned Perl and a lot of different answers will be given, ranging from reading books, attending courses and training sessions, visiting a conference, playing with and adapting small scripts found at the Perl Monks or elsewhere on the internet, reading the official documentation and man-pages or online turorials to -last but not least- visiting the online communities like Perl Monks and Perl Mongers.

To start with this monastery: it is a good place to start. Take a small tour and don't forget to include the many sections, PerlMonks FAQ, Library and Categorized Questions and Answers. Talk to other monks in the Chatterbox. Certainly the many Tutorials are good to begin your quest for wisdom, like How (not) to ask a question.

Before asking something, first use the search page to discover whether someone asked it here, or whether it has been explained already in a meditation or elsewhere. Search first, and then read, read, read, try, adapt, retry, read, search again, for instance here:

and ask later.

Written materials (like books and magazines): just one ways to learn Perl, and a good one. Many people learn best from books. Lists with numerous books about Perl can be found on several places, like on this well-known perl.org site. Some of the most often advised books for starters (and what's been good for many might be good for you too):

Quite a lot of people insist that a course given by a tutor (maybe even an expert) is the best way to learn Perl. Lots of experts can be hired to give a course. Courses can be followed at universities, colleges and general training institutes. Prices may vary from "el cheapo" through the grassroots YAPC'es through "Cruise Superdeluxe" through full-blown commercial conferences, and quality is (as with books) not always directly related to the price. Being able to discuss Perl topics with a local expert certainly helps a lot. In any case, it is not a good idea to learn something and not use it. As with many things, an introductory course in Perl as part of a whole lot of courses and trainings and lessons, without actually using Perl to make or adapt something in Perl, is a waste of time. P is for Practical. Learn it and use it.

Others just want to learn on the go, looking for scripts, trying to understand them, playing with them. It's better to first learn the basics of Perl before you play with the scripts, but programmers who are experienced in other programming languages might recognize a lot right away, but might be confused by similarities that are actually differences. People who freshly start learning how to program: please first get some basic programming knowledge, take a look here for a start. Anyway, lots of Code can be found in the Snippets Section, Meditations, Craft and Seekers of Perl Wisdom. Don't be afraid to try things, and don't be put off if they don't work the first time. Trying to figure out why something doesn't work is a very good way to learn Perl. Sometimes you'll find somebody else's script is erroneous and it can be very rewarding to find its error(s).

In general, our fellow monks agree on the path to wisdom: read a lot, install perl, try some scripts, change those scripts, try to discover why certain things work the way they do and why other things go wrong, read more, try more complex scripts, play with them, etc, repeat. When you are just beginning to learn Perl, most questions you come up with have been asked already (some very often) and quite often the answers can be found here easily. So, learning Perl includes learning to search as well. You might want to postpone asking a question in Seekers of Perl Wisdom until you have tried to describe your question for yourself, saved the description in a file, read specific materials, try to find the answer yourself, make a script that should do what you want, and than, when you really have no idea how to solve the problem, don't be afraid to ask your fellow monks (please read How (Not) To Ask A Question and Before You Post ... before you post your first question). And still it is surprising how many questions are asked for which the answer is on the 10th page of one of the beginner's books mentioned here, or one super search party away. It might be embarrassing to find that out, but as long as it's educational...

Setting a goal helps a lot, and it's good for your motivation to learn Perl. You might set yourself to the task of building a web shop, a user and product database, an analyzer of web logs, a moderated discussion forum, a family photo album, a weblog. At first, don't just take the "easy" road right away by taking one of the many modules and examples that are around, because in the beginning it's hard to distinguish between rubbish and pearly bits, so maybe later. Write lots of small programs rather than a few big ones. The big ones come later. You might be the one that speeds up the Schwartzian Transform with 50%! New people, new ways of thinking. And of course, instead of you yourself setting a goal, there are always people happy giving you an assignment (job, housework, hobby club). Can be motivating enough.

If Perl is not your first programming language, dig out some of your favorite programs that you have written in other language(s) and convert them to perl. Start with the simple ones and work your way up. It is always easier to start with something you are familiar with than trying to do something new in a new language. If your previous language was C,C++, Pascal, Basic or any of a dozen other languages you should find the transition to Perl reasonably easy and, once you get over the basic syntax hurdles, a joy. Once you get passed some of the more unintuative bits of syntax, you will probably find Perl a revelation in terms of the ease with which many things that are hard to do in other languages seem to simply fall into place with Perl.

If Perl is your first programming language, you might find it helpful to read one or more books on programming basics, logic, design and history, like Understanding Unix/Linux Programming: A Guide to Theory and Practice (a review), Advanced Programming in the Unix Environment or How to design programs. Apart from knowing the specific syntax and structure of any language, it is always helpful to have a good idea of how a program should flow and to be able to identify and use correct programming structures.

Learning a programming language is a bit like learning any language, like French or Russian. You get better the longer your experience is with it and the more you use it. Learning the basics of Perl is quite easy, learning how to program well in Perl will take some more time, some more practice, some more experience. By the time you understand (and use) more than half of all the scripts, discussions, questions and answers you see here, you are on your way to be a good programmer. As you become more familiar with the language, you'll discover better ways of coding which had previously not occurred to you. You can hasten that learning process not just by experimenting more, but by reading books and other people's code. Even consider forcing yourself to program in Perl: if you don't know how to do something, search until you figure out how to do it and after a few months (maybe even weeks), you have become comfortable enough with Perl. By the way, Perl is big: there are not many programmers who know every command, function, module etc of Perl (if there are any). So there's nothing (or not much) to be ashamed of for not knowing a lot about it. Just be proud of what you do know.


This node evolved quite a bit. Many thanks to fellow monks, especially to gjb, gmax, larsen, graff, Louis Wu, liz, jarich.


I've made a Dutch version of this page. To be used during and after the Second Dutch Perl Workshop I remade it into a small and simple Dutch website.

Comment on Where and how to start learning Perl
Re: Where and how to start learning Perl
by gjb (Vicar) on Aug 15, 2003 at 16:16 UTC

    Excellent list, congratulations!

    I could have missed them, but it seems a few nice sites aren't mentioned you might want to include:

    • http://www.perl.com somewhere, a lot of interesting articles can be found there, as well as a nice tip of the day.
    • Also http://use.perl.org is a good news site on Perl, although the most important stuff gets mentioned on PerlMonks as well.

    I didn't check, but if no similar resource is available this would be a nice entry for the tutorial section or the FAQs.

    Just my 2 cents, -gjb-

      For learning Perl the TMTOWTDI paradigm of Perl applies:
      there's more than one way to do it.


      #So how come theres only one way to do comments?
      hmmm...

      webM
        webmasta,
        To my knowledge there are quite a few ways to do comments.
      • # comment goes here
      • POD comments documenting your code
      • __END__ comments follow
      • Acme::Comment

        I have even seen some people use here docs for comments, though it really is code. I am sure creative monks have found even more.

        Cheers - L~R

        use strict; my $TMTOWTDI = "There IS more than one way to do it"; my $MeaningfulVariableName = "Is another way"; $MeaningfulVariableName =0, "And if you get creative, even more"; *SomeOtherWayToSayIt = *MeaningfulVariableName ; SomeSubroutine($MeaningfulVariableName , "Extra arg used as a comment +");
        I'm sure there are other creative ways to do it - I'm not recommending any of this - it's just that this node invited a challenge.
Re: Where and how to start learning Perl
by gmax (Abbot) on Aug 15, 2003 at 16:30 UTC
Re: Where and how to start learning Perl
by larsen (Parson) on Aug 15, 2003 at 16:50 UTC
OT: Perl CBT?
by xChauncey (Scribe) on Aug 15, 2003 at 23:05 UTC
    Wow! Great list.
    <ramble>

    Your list and homenode made me think of starting a CBT on learning Perl. I was thinking chapters on particular features of Perl, followed up by interactive practice sessions, in which the user could enter script and have it judged based on whether it would compile, and whether it would produce the desired outcome.

    Of course there would be a security issue if the program were web based, but if a training program were available to download and use on the user's own computer, this could be avioded.

    I work as a CBT developer, and have been learning Perl for several months now. I usually develop in Authorware, but I think that in keeping with the spirit of open source, if I have time I may try my hand at something like this in HTML and Perl. The hardest part would to produce an interactive and engaging CBT rather than a static tutorial reader, and judging the interactive scripting sessions (possible even?) since there are so many different ways to do things in Perl. Maybe a more realistic approach would be to have a more traditional question and answer quiz at the end of each chapter, on which the user would be immediately judged and provided with useful feedback.

    Pipe dreams?...

    </ramble>
    update Of course all of this would have to wait until I were to gain a much better understanging of Perl, and even then would probably be limited to the simplest concepts.
      I've been making CBT for quite a while and I still look back with some fondness at that time. But anyway... of course it's a piece of cake to build good CBT with HTML and Perl (throw in some MySQL). I just wished I had Perl and HTML (and MySQL) 16 years ago... It would have been so much easier.

      But please don't make the same mistake as CBT-developers of all times made. It's not the tools with or the media on which the CBT is made. It's always about the content. And of course the way you present the content is important, but not as important as the content itself. Good written text, presented in small enough parts so the reader won't get frustrated. Good questions, good answers, good record keeping, low reaction times.

      Good CBT can be made with MS-DOS batch files, bad CBT can be made with the most modern and best content management systems (which tend to be horribly slow). Many many books have been written and, as it seems, seldomly read.

      As to your suggestion to write CBT which contains something for judging Perl scripts: that's closer to Artificial Intelligence than to CBT. Debuggers can do a lot nowadays, but not checking for something to have a desired outcome.

      I've seen the prices paid for CBT these days and I think they're ridiculously low. No fun or honour in there any more. I guess I'll stick to writing and consulting and maybe some more programming.

      There are a lot of reasons why there are so small amounts of good CBT and why CBT is not used much more. The same with good websites. Lots of people think it just comes in for free, and don't want to pay for it.

      Update: corrected spelling mistakes (again)(2x) and added a sentence at the end.

Re: Where and how to start learning Perl
by graff (Chancellor) on Aug 16, 2003 at 02:16 UTC
    Maybe this is covered "indirectly" by probing through the links you have so far, but personally, I think "The Perl Journal" (God rest its soul) deserves direct mention:

    The Perl Journal (http://www.tpj.com/)

    It's no longer an active publication (at least, not in physical paper magazine form), but it's still there in the online sense -- and it has a lot dynamite stuff. (The magazine covers alone were unparalleled for wit, depth, and entertainment value.)

Re: Where and how to start learning Perl
by Louis_Wu (Chaplain) on Aug 16, 2003 at 03:15 UTC
    I'm not seeing the documentation included with Perl, accessed via command-line. I find the following quite handy:
    perldoc perl displays the listing of docs and describes Perl perldoc -f open displays the documentation for the "open" function perldoc -q larry displays the topics from the FAQs which contain the word "larry"
    This stuff is available anywhere you have Perl (if the docs have been installed, some admins are odd), which is handy when you're coding in the coffee shop (without wifi) and can't get to the Monastery.


    Perl programming and scheduling in the corporate world, as explained by dragonchild:
    "Uhh ... that'll take me three weeks, broken down as follows: 1 day for coding, the rest for meetings to explain why I only need 1 day for coding."
Re: Where and how to start learning Perl
by woolfy (Hermit) on Sep 19, 2003 at 08:11 UTC
    Update: On September 19, 2003, finally added the section "Several ways to learn Perl" to this node. So far, the node was just a bunch of links with descriptions, or as you want, the "where" to learn Perl. Now the "how" is added, in which several threads about the subject are distilled.

    Several people pointed me to some other good sites and books, which I gladly added (thanks!). There's some great stuff out there!

Re: Where and how to start learning Perl
by flatline (Novice) on Jan 15, 2004 at 22:04 UTC
    I don't know if this is legit or not but, hey, here it is.

    A good collection of the basic o'reilly perl books (older versions, but still good), nicely organized for your perusal. Includes full indexes and all.

      The website you refer to is already gone. And no, such websites are not ligit. There are a lot of people who have digital versions of such books and they are actually not very hard to find. But they are infringing on copyrights and they do cost money to publishers and authors (arguably, one might say that someone who reads the digital illegal copy of an older version may be quite happy with it and than want to buy the legal edition of it, but people probably will just stick with the illegal version and even distribute it further).

      I assume the publishers and some active authors check the internet regularly for such illegal copies, and then contact the providers, and ask them to remove the illegal content (and if necessary threaten them with legal action). Therefore a lot of those websites with illegal content come and go. Some of those websites are online for just a couple of hours a day, a couple of days a week.

      Interested people better buy books on CD, like the O'Reilly Perl CD Bookshelf or pay for online available books, like the Safari Bookshelf Perl Books. That's the newest version, and the authors get their work paid as well.

        Sorry about that...they appear to still be up so I killed the link in my previous post. In case you're curious, I do own all of the books on there. I'll check out the CD bookshelf, obviously that's where they got their content from.
Re: Where and how to start learning Perl
by bhappy (Scribe) on Feb 12, 2004 at 06:57 UTC
Re: Where and how to start learning Perl
by ig (Vicar) on Mar 29, 2009 at 06:15 UTC
Re: Where and how to start learning Perl
by jaschwar (Acolyte) on Aug 10, 2009 at 19:12 UTC
    When you do update this page, please update the link for Manning's e-books as http://www.manning.com/catalog/perl/ and its corresponding books. While the books are available it might be good to note that these are paid downloads. Might be good to have a free downloads section and paid under books, but just a thought. I don't pay for my perl resources when so many free ones exist.
Re: Where and how to start learning Perl
by Anonymous Monk on Mar 16, 2012 at 07:37 UTC
    The Perl Tutorial Hub contains links to some good and recommended tutorials reviewed recently

      Who are you?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://284175]
Approved by gjb
Front-paged by gjb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-10-01 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (1 votes), past polls