Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Whats the average time taken to learn Perl?

by Anonymous Monk
on Dec 18, 2012 at 12:57 UTC ( #1009358=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Wise Monks,

I know that learning Perl or any language for that matter takes time. Its more like learning one's native language which one can speak but to master it, it could take a lifetime.

However, from the point of view of being able to do stuff in Perl like automating tasks/reports etc, or do some real production level work, how long does it take?

Whats the average time taken to learn Perl to a comfortable level?

Also, kindly suggest a book to start learning Perl. I am familiar with basics of C (Very basic level stuff). Ideally looking for a book that would get me to write production level scripts. Ofcourse, its my input that will matter, yet, any suggestions would be very helpful.

Comment on Whats the average time taken to learn Perl?
Re: Whats the average time taken to learn Perl?
by marto (Chancellor) on Dec 18, 2012 at 13:05 UTC
Re: Whats the average time taken to learn Perl?
by karlgoethebier (Curate) on Dec 18, 2012 at 14:21 UTC
    "...how long does it take?"

    One day ;-) Joking aside, when i started to learn it, it was a bit like this. I had to maintain a large CGI website. It was written in perl by someone with a C++/Java background who learned perl on the fly. He made everything "by hand". No modules a.s.o.

    I made a local copy of the site, took my list of todo's, started reading the manuals and applied the changes to the local copy. When they worked, i put them online.

    Don't ask about the code, but day by day it got a little bit better.

    Let's say you want to learn french: in one hour or so you know how to say hello, to order a cup of coffee or how to buy a bread. Having some little conversation with the barmaid will take a little longer and reading and understanding a newspaper takes long. How long it takes depends on you. And you can't learn it only by books. You need to talk it.

    Another example to illustrate this: You want to learn a musical instrument, let's say trumpet. Often asked question then: "How long does it take until i'm a musician?"

    In my opinion this is a wrong approch and a wrong question. Doing any kind of things should been taken serious at any level of skills. In the moment you take your horn you are a musician.

    The question better should have been: "When can i play in a band?"

    And that just depends on you. Some reach this goal within some month, some need years and some give it up.

    I hope that helps. Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Re: Whats the average time taken to learn Perl?
by mrguy123 (Hermit) on Dec 18, 2012 at 14:38 UTC
    Hi there
    When I started learning Perl I already had a degree in computer science. I bought this great book and started reading it and doing the exercises.
    I think it took a week for my Perl to be fairly decent, but it was nearly all I did during that week. Since then nearly 7 years have passed and my Perl is much better (still learning new things), but that first week really gave me a strong push
    Hope this helps

    Mr Guy

    Thats silly...or a powerful mathematical equation, I can't choose which....
Re: Whats the average time taken to learn Perl?
by blue_cowdawg (Prior) on Dec 18, 2012 at 14:42 UTC
        Whats the average time taken to learn Perl to a comfortable level?

    The official answer: "It depends."

    I teach dog training on a regular basis along side SWMBO (my wife) and one of the "lectures" I give a class of students goes something like this:
    "
    Don't get upset at your dog if they don't learn the skills we are teaching you as quick as another dog does. That does not mean you are doing something wrong and it does not mean your dog is stupid. Every human and canine learns at a different rate. Some are quick studies and others need more time. If you try to hurry the process all you are going to succeed at doing is frustrating yourself and make learning an unhappy experience for your dog.
    "

    That bit is not to be confused with the old saw about teaching a pig to sing (wastes your time and annoys the pig).

    Take your time with learning Perl and enjoy the process. As time progresses you'll find yourself getting more and more proficient at it. The danger being is there is a trap where by you approach every problem the same way. Be prepared to occasionally step out of your comfort zone. That's where real learning starts.

    Seems to me there are a lot of Monks out there concerned about the learning process...


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
      "Seems to me there are a lot of Monks out there concerned about the learning process.."

      Yes, indeed. I'm always surprised again about this - but there are some very old rules about learning:

      1. From easy to complicated
      2. From slow to fast
      3. Practice every day
      4. Have patience
      5. Try to have a new insight every day
      6. Start again from step one

      And i think there are just three levels to do anything:

      1. Do it - it's OK when it works
      2. Do it better - perhaps it is faster or something else
      3. Do it nice - perhaps it matches a more sophisticated criteria

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

Re: Whats the average time taken to learn Perl?
by Utilitarian (Vicar) on Dec 18, 2012 at 14:48 UTC
    When I learnt Perl it was for my own entertainment and I had no academic background and no one to advise me on suitable training material, however I found a very popular script archive on the internet...several years later I think I've cured most of the errors I leant there ;)

    If you know C and have some level of familiarity with the Unix shell, Perl will take a relatively brief time to get up to speed for automation and reporting (the precise length of time is a function of your effort and ability).

    Production level public facing code will take a bit longer and will require an understanding of multiple areas, not just of programming but of the underlying technologies also.

    The trip is quite a long one however the voyage is fun.

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
Re: Whats the average time taken to learn Perl?
by moritz (Cardinal) on Dec 18, 2012 at 15:21 UTC

    I learned Perl in my free time for low-priority hobby projects. After half a year or a year I felt comfortable. However looking back, I frown at the code I wrote back then, and call my earlier self over-confident. And I've certainly learned quite a bit about Perl since then.

    Now it's about 9 or 10 years since I started to learn Perl, and I still learn new things about it.

    It really, really depends on how much effort and time you put into it, and how much background knowledge you have (in how operating systems work, background in other programming languages etc.).

Re: Whats the average time taken to learn Perl?
by SuicideJunkie (Priest) on Dec 18, 2012 at 17:31 UTC

    I would say, if you know what you want to do, and roughly how to do things, then learning the syntax to do it is easy.

    If you're trying to learn algorithms and programming at the same time, doing it in any language is going to be hard.


    I was introduced to Perl at work, and was given 2 weeks to get up to speed on it. Now, I was already a developer and knew algorithms and a couple flavours of C and VB, so all I needed to learn was the actual language.

    I spent the first day collecting files and installing, and browsing around and found http://perldoc.perl.org/ and perlmonks.

    The second day, I aimed high and grabbed some sample code which opened a port and echoed back what you sent it. Over the week, I then turned that into a little market/exchange server that would let people log in and trade virtual resources for a play-by-committee game.

    At the time, I didn't get dereferencing syntax, so the code was quite verbose with each deref step on its own line and no arrows in sight (just @$ref and friends to start with). My code also had a strong C accent, but I've gotten a lot better since then ;).

Re: Whats the average time taken to learn Perl?
by Anonymous Monk on Dec 19, 2012 at 00:51 UTC
Re: Whats the average time taken to learn Perl?
by tobyink (Abbot) on Dec 19, 2012 at 01:22 UTC

    The thing is, you can write Perl in a very C-like manner. (Some people like to play the sport where you write programs which will compile as both valid C and valid Perl!) Writing Perl that way will probably not take you long to pick up...

    # Function to add a list of numbers together sub sum { my @numbers = @_; my $sum = 0; for (my $i = 0; $i <= $#numbers; $i++) { $sum += $numbers[$i]; } return $sum; }

    But on the other hand, this function might look more foreign to you, but if you had experience writing Haskell or Miranda would seem perfectly obvious:

    use List::Util 'reduce'; sub sum { my @numbers = @_; return reduce { $a + $b } @numbers; }

    A seasoned Perl programmer will probably have discovered that the following knocks the socks off both of the above performance-wise...

    sub sum { my $sum; $sum += $_ for @_; return $sum; }

    But once you'd gained familiarity with the core libraries and with CPAN, you'd realise that List::Util (from which we borrowed the reduce keyword earlier) has a sum function available, and it runs about 40 times faster that the first example given above. :-) So you'd just borrow that...

    use List::Util 'sum';

    So in answer to your question, it might take you a couple of days to start writing C-like code in Perl, but as with any mature programming language, familiarity with the important libraries, and a feel for writing elegant and efficient code take many years to develop.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: Whats the average time taken to learn Perl?
by Your Mother (Canon) on Dec 19, 2012 at 05:29 UTC

    Many persons criticize Perl as being difficult or inappropriate for beginners. My university degree is a BA. I had programmed as a kid so it was familiar but I came to Perl almost exactly 20 years since I had written a line of code.

    I wrote my first production script in Perl at amazon.com in a non-dev role after two weeks—my own time, I wasn’t paid to do dev work—of hunching over an early edition the Llama. It was not comfortable and it was another two years of hacking before I realized that perldoc was available and helpful.

    Perl excels at getting things done. The verbosity and silly hoops of the Perl I wrote back then is mildly embarrassing now but it worked well enough for a couple hundred employees to use the first thing I wrote in it all day, every day. Today I could rewrite the script that took me two weeks then in about 15 minutes. But I also make about five times as much base pay now. :P

    More than a decade later I’ve only felt totally at ease with Perl for a few years and, like moritz said above, find myself learning new things—about it, in it, to be done with it—on a regular basis.

    Pick up any of the books that have decent reviews—and the online freebies. Search around here for recent (last two years) recommendations. Books are a great investment. Don’t let a $40+ price tag bother you. That’s an hour or an hour and a half of junior dev pay.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1009358]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-08-01 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls