Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Recomendations For Learning perl?

by adamZ88 (Beadle)
on Dec 07, 2016 at 20:44 UTC ( #1177422=perlquestion: print w/replies, xml ) Need Help??

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

All, I want to seriously expand my Perl knowledge. I am a network engineer and I have seen the powers of Perl and how it can make the job easier. I have limited programming experience. I took an intro to Java class, an HTML Class, a Ruby on rails class, and a programming for networking class where I learned Linux and pearl. Even though I like all of you monks, I would like to only come here for the real advanced stuff. How do you recommend that I go about mastering pearl programming? Do you have book recommendations or is it better to take a class?

Replies are listed 'Best First'.
Re: Recomendations For Learning perl?
by 1nickt (Abbot) on Dec 07, 2016 at 20:53 UTC

    Hi adamZ88,

    Welcome to the monastery.

    The first place to start would be, which has a lot of links to other sources of documentation, books, etc.

    The "best" way to learn is going to depend on you, but many, many people have trod the path of the O'Reilly books, "Learning Perl", the Llama Book, "Programming Perl", the Camel Book, and then maybe on to Intermediate Perl or Advanced Perl.

    The Perl documentation is very good for learning, for the beginner to the expert: try perldoc perlintro (or online at perlintro).

    There's also Modern Perl online, for free, which assumes you know a little more about programming in general.

    But in my opinion the best way to learn is to experiment, which is super-fun in Perl. Make a directory you can access in your shell, and start writing tiny programs to experiment with ideas and concepts that intrigue you that you see on this site or elsewhere. I've been building with Perl for more than 20 years, but last weekend I spent an hour making a silly script to find all the words in the dictionary in which all the letters of any other word appear in order, because I wanted to see how many words contain my name (only one: 'antischolastic').

    Hope this helps!

    edit: added links

    The way forward always starts with a minimal test.

      Looks very helpful. Thanks. I do find it that programming for things that interest me makes things easier and more fun to learn. I will give this I tr. Hmmm I wonder how many words contain my name.....

Re: Recomendations For Learning perl?
by kennethk (Abbot) on Dec 07, 2016 at 21:21 UTC
    Adding to the excellent responses so far, I would add 2 recommendations:
    1. Read other people's posts here and see if you can solve the challenges. Don't worry about being fast or even posting anything, but that will give you some very good practical challenges, and you can compare your answers to those of monks. Obviously, don't waste time on poorly phrased questions -- you'll learn how to spot those quickly.

    2. A good source of basic math challenges is That'll give you some things to try beyond "hello world".

    Once you've got some basics down, feel free to post code here for critiques.

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Re: Recomendations For Learning perl?
by huck (Parson) on Dec 07, 2016 at 21:34 UTC

    One way to learn that i have not seen here YET is to read other peoples programs. While i have a CompSci background most of my insight has come from looking at how other people solve problems.

    There are lots of programs that other people have written here, some advanced some basic. Search for a subject you are interested in solving and just read thru the code that has been posted already. Another such resource is CPAN. At first don't try to understand everything in the code, just try to generally follow their train of thought. Then if you like their style look deeper and try to understand the particulars in the code. Since this is a learning exercise rather than just copying their code and running it try to write your own base code using their techniques. If you run into a problem understanding something FIRST try to search for an explanation by yourself; the Perl documentation websites are useful for this. Your search may provide a number of explanations that will enhance your understanding of that process. Then if you still are confused post a question about it and i am sure you will receive much help to further your understanding of the problem.

    As you progress it becomes time to "no longer invent the wheel", and use modules or other existing codebases. When i do this i like to leave comment links in my code that refer to where i learned the technique. But at first go ahead and get your hands and elbows dirty by writing your own code, even if it includes snippets of code from other people.

Re: Recomendations For Learning perl?
by Discipulus (Abbot) on Dec 07, 2016 at 22:30 UTC
    hello adamZ88,

    recomendations? yes see this recent reply of mine..

    I also have some bookmarks about learning and teaching on my homenode

    Searching learn is SuperSearch here at PM can reveal you real pearls of wisdom, to learn perl (you have two typos in your post)


    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: Recomendations For Learning perl?
by Phenomanan (Monk) on Dec 08, 2016 at 14:32 UTC

    The "Perl Cookbook" and "Perl by Example" really helped get me started. If you buy them, make sure to buy the far cheaper used ones. I got both books for under $10!

    I do however hold that these books are only useful for getting you started and teaching you the basics. To actually become proficient with Perl, you have to tackle projects. This could literally be anything; just come up with an idea and do it. For example, one of the first things I did was create a script for an NFL weekly Pick'Em league that takes a .txt list of the current week's winning teams, and then highlights the correct picks in a spreadsheet. You could start even smaller, like just modifying a text file, and build up from there. I'd also suggest just looking for modules that seem useful/powerful and tinkering with them to see what you can do.

Re: Recomendations For Learning perl?
by FreeBeerReekingMonk (Deacon) on Dec 07, 2016 at 21:53 UTC
    Welcome adamZ88. Make it fun AND useful, learn by fiddling and tinkering (i.e. less reading, more running/modifying example code). Once you got the basics of the Perl language down (don't try to learn every function, but at least know they exist). Dig into cpan, here are some modules that could be of interest to you:

    Cisco::Hash Cisco::SNMP Net::Telnet::CiscoCisco::ACL Brocade::BSC

      You know! I truly do agree with the "less reading" part. I do not have anything against reading, but reading this kind of technical stuff on your on can be a bit overwhelming. Though, I should be used to it reading all the Cisco Docs I have read, but still. As far as the modules go, you hit the spot, SNMP and Perl combined is one of my major interest. I have made a couple of scripts that do some very interesting things. I have just given up on a script that was meant to trace an IP all the way back to its access switch. Unfortunately there is no correlation on a CDP index and a iFindex, thus, this makes it very difficult for me to complete my program.

Re: Recomendations For Learning perl?
by Anonymous Monk on Dec 07, 2016 at 21:00 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2021-01-19 14:01 GMT
Find Nodes?
    Voting Booth?