DanielM0412 has asked for the wisdom of the Perl Monks concerning the following question:

So i need to understand perl better, and my resources arent helping very much, How did you guys learn perl so well?? any recommended books/websites? Thanks in advance

Replies are listed 'Best First'.
Re: where did yall learn perl?
by moritz (Cardinal) on Jul 25, 2011 at 15:51 UTC
    How did you guys learn perl so well?

    By writing code and testing it, reading code, reading books and reading and writing on perlmonks.

    any recommended books/websites?

    Lots, depending on your level of knowledge. "Learning Perl" and "Modern Perl" are good for starters, many good books address higher skill levels.

    http://perldoc.perl.org/ and http://search.cpan.org/ are among the most valuable Perl websites for me.

Re: where did yall learn perl?
by davido (Cardinal) on Jul 25, 2011 at 16:37 UTC

    The more I study and learn Perl the more I think I still have a lot of Perl to learn and study. But where I am at the moment in my learning curve is a result of good books (enumerated on my home node), practice, PerlMonks, CPAN, the Perl documentation, and a lot of invested time.


    Dave

Re: where did yall learn perl?
by AR (Friar) on Jul 25, 2011 at 16:13 UTC
    I know I'm speaking for more than just myself when I say I never stop learning Perl. There are some monks here who know the language inside and out, but a very large population are constantly learning. I practice and read and take apart the code of others to add more Perl tools to my belt. The monastery itself continues to be one of the greatest resources I use.
Re: where did yall learn perl?
by zek152 (Pilgrim) on Jul 25, 2011 at 15:51 UTC

    I learned perl from Learning Perl, perldocs, google and right here(at PerlMonks).

    Don't be afraid to ask questions. The stupidest question is the one you didn't ask. Put a little bit of time into a post here and people will flock to help you. Literally flock. We are like sheep.

Re: where did yall learn perl?
by FunkyMonk (Chancellor) on Jul 25, 2011 at 21:48 UTC
    By having a problem to solve.

    I had a huge set of scripts written in awk but eventually I needed more than it had to offer. I dabbled with Java, but at that time there wasn't a standard regexp library, and those that were available were poor.

    I needed a more expressive language and Perl seemed the obvious choice being a C/Linux/sed/awk/shell kinda guy.

    Although I bought Learning Perl and Programming Perl, the book that helped me most was the awesome Perl Cookbook, but I guess that's because I already knew how to program.

      This was how (and why) I learned. I needed to be able to interact with an FTP site autonomously. I had heard, I have no idea where, that Perl could do that. I found the doc for Net::FTP and 5-6 examples of how to use it online, and went from there. That solved my immediate problem and also revealed how (relatively) easy learning other language features would be, because of the wealth of tutorials and examples online.

      Once I had one working Perl program, that opened the door for others. The next application, IIRC, was compiling statistics over a very large number of text files for a report. I later learned regexes when a trading partner mixed different transaction types in a single transmission and I needed to sort them out. It seemed like magic.

      I continue to learn to meet new challenges at work, and also from stuff I pick up here by osmosis. I picked up The Perl 5 Programmer's Reference at Half-Price Books and that sits on my desk; it is usually the first place I look. Perl documentation would be the second.

      As an aside, I have that particular book because it was at the store at the same time I was. It is okay for syntax, for 'how' but never for 'why'. I would not recommend it over any other.

Re: where did yall learn perl?
by luis.roca (Deacon) on Jul 25, 2011 at 17:34 UTC
    Hello Daniel,

    If we take a step back and ask: "How do you learn anything worthwhile?" For ME it would be to start by surrounding yourself with everything having to do with the subject. In the case of Perl it's fortunate that there are lots of ways to do that.

    I started learning Perl by surrounding myself with it as much as possible. I bought the recommended books in both paper and digital format. I have the Perl Cookbook on the home screen of my phone. My laptop's desktop background is the face of a camel (no seriously >> It's a portrait of a camel). I shadow good Perl programmers by coming here to the Monastery and reading the blogs of well know people in the community. I've gone to a Perl user's meeting through Meetup.com (Check out if there's a local Perl Monger's group near you.) When I go out there's a Perl book in my hand with a notebook. I keep the radio off in my car to give me space to think about projects (Perl and otherwise). Like I said: Surrounded Completely :-))

    If you want to learn anything that's worth learning (like Perl, the guitar, math or how to draw etc.) they take a significant amount of your life to learn well (let alone to master). According to Malcolm Gladwell in Outliers, the 'magic number' is 10,000 hours. So patience would be my biggest recommendation. ;-)

    As for books, if you're new to programming and the UNIX environment I would highly recommend Elements of Programming with Perl. If you're more advanced than that, I would agree with the previous mentions of Learning Perl and/or Perl Cookbook.

    Good luck and have fun learning Perl!

    Luis


    "...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." Don Quixote
      hahaha the camel comment cracked me up, and i will definately get a few more books, and make my background a portrait of a camel, :-) thanks
Re: where did yall learn perl?
by koolgirl (Hermit) on Jul 26, 2011 at 03:26 UTC

    I'm certainly not a veteran yet, but I'm about half way into my mighty rookie to geek morph, and just about every key concept I've learned, has come from hours upon hours of debugging, figuring what the $#!& I could've done wrong this time...oh and by RTFM....over and over again....that and resisting the ever so attractive impulse of throwing the monitor out the window, and debugging it just one more time.....

    ...and, of course, after all previous efforts, finally posting a question you know is worth while, just to find out you missed the two word answer on page one of the "friendly" manual. Thankfully all these wonderful monks took pity on my exasperation and always gently nudged me in the right direction....;)

Re: where did yall learn perl?
by graff (Chancellor) on Jul 26, 2011 at 02:26 UTC
    My first substantial learning experience in Perl was in the Perl 4 days (even before web pages existed!); I was handed a few thousand lines of code arranged in several source files that worked together in a pipeline (output of script 1 goes into script 2 then script 3, etc, each of which did a specific text filtering/conditioning task). I was supposed to make it work on a different qulaity of input data.

    I spent a lot of time looking up descriptions of core functions via perldoc perlfunc. It took me a while before I discovered the very handy "perldoc -f function_name" approach, but that was okay, because when I scrolled through all those other functions on my way to read about "split" or "substr" or whatever, I learned about a lot of useful things.

    I used a lot of the other man pages as well (perlsyn, perlvar, perlop, anything else that looked interesting or relevant). Throughout it all, the thing that helped most in my case was Perl's adoption of -- and useful extensions to -- things I was already familiar with from using C, unix shell, and regular expressions (as in unix tools like 'sed' and 'grep').

    But it was also very helpful to be starting with code that already did useful stuff, and having some idea of additional or different stuff that I wanted to make it do. Breaking code, and using the perl debugger to figure out how it broke, can be very instructive.

Re: where did yall learn perl?
by BrotherRufus (Initiate) on Jul 26, 2011 at 00:35 UTC

    I started learning Perl on Win98, because VisualBasic just hurt too much. My only previous programming experience had been Basic and Machine Code on an Apple IIe. I stumbled across Perl and fell in love.

    I agree with FunkyMonk that projects are a good way to go. Most of my learning has come from working on personal projects, things that I wanted to do and that were fun. I would keep trying until I got whatever it was to work. Given my programming background, this involved a lot of unlearning wrong ways of thinking and frustration to begin with.

    One of my favorite books is Perl Hacks. I also use web searches and am starting to learn just how awesome perldoc can be.

Re: where did yall learn perl?
by DrHyde (Prior) on Jul 26, 2011 at 09:58 UTC

    I got started when I was my employer's "internet expert". This was back in 1994 or so, and "internet expert" meant that I'd used email when I was at university and had once seen (but not used) a web browser. I was given a task to put a local estate agent's listings on this new-fangled "world wide web" and provide a way for interested customers to contact the agents. This led me to Matt's Script Archive and the infamous formmail, and to some of his other stuff too. Of course, as requirements grew, those scripts didn't *quite* do what we needed, so I had to update them, and that's how I first learned perl.

    I then later learned perl *properly* by ending up using it a *lot* a few jobs later and through getting in contact with the rest of the perl community via comp.lang.perl.misc and then being one of the founder members of my local Perl Mongers group.

    Perl wasn't my language of choice. After my initial dabblings, I then got seduced by Java, and the job I really learnt perl in was one where I was originally employed to be a Windows NT admin and Java programmer - and did neither, as I was immediately put onto a perl project running on Solaris, which I ended up adminning as well. Perl and Java (and C, and all the other ALGOL-family languages) can all be treated as being pretty much identical, so getting up to speed and becoming a vaguely useful developer took about a week of *using it*. Becoming an *expert* - that took years and I'm still learning.

      Becoming an *expert* - that took years and I'm still learning.

      There in lies the trap of becoming an expert, its a moving target, so to remain an expert, you have to keep learning :)

Re: where did yall learn perl?
by Anonymous Monk on Jul 25, 2011 at 21:03 UTC
    You learn how to use a tool by using it ... constantly. There does not come any point where you suddenly realize that "you have achieved enlightenment," only that you realize that you can rapidly do what you need done. Then, a True Master comes along and you realize that you know nothing at all.
Re: where did yall learn perl?
by Anonymous Monk on Jul 26, 2011 at 03:46 UTC
Re: where did yall learn perl?
by topher (Scribe) on Jul 26, 2011 at 18:41 UTC
      Is it just me or is that site not responding?
Re: where did yall learn perl?
by fisher (Priest) on Jul 26, 2011 at 14:21 UTC
    I suppose my answer would look somewhat strange, but I learned perl playing MUD (textual multiplayer game).

    This game quickly became for me to a game of programming my own NPC (bot), not just about gnomes, elves and orks =)

      Not strange at all, if you ask me -- Practicing your programming skils on a project you care about is essential for learning.

Re: where did yall learn perl?
by perl.j (Pilgrim) on Jul 25, 2011 at 19:40 UTC
    I'm not an expert, but the if you look at my home node you will find what I did in my first month of earning Perl.
    perl.j-----A Newbie To Perl