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 (Canon) on Dec 07, 2016 at 20:53 UTC

    Hi adamZ88,

    Welcome to the monastery.

    The first place to start would be https://learn.perl.org/, 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.....

        Not as many as I would have guessed!

        $ perl dev/bin/namagram.pl adam 1 abecedarium 2 acaridomatium 3 accidentalism 4 acediamine 5 acrodactylum 6 adactylism 7 adamant 8 adamantean 9 adamantine 10 adamantinoma 11 adamantoblast 12 adamantoblastoma 13 adamantoid 14 adamantoma 15 adamas 16 adambulacral 17 adamellite 18 adamine 19 adamite 20 adamsite 21 adaptionism 22 adaptometer 23 adarme 24 adatom 25 additament 26 additamentary 27 adelarthrosomatous 28 adelphogamy 29 adenoacanthoma 30 adenocarcinoma 31 adenocarcinomatous 32 adenochondrosarcoma 33 adenomatome 34 adenomyxosarcoma 35 adenophthalmia 36 adenosarcoma 37 adhamant 38 adharma 39 adiantiform 40 adiaphorism 41 adiathermal 42 adiathermancy 43 adiathermanous 44 adiathermic 45 admeasurement 46 adoptianism 47 adream 48 adreamed 49 adreamt 50 adrenalectomize 51 adrenalectomy 52 advancement 53 adynamia 54 adynamic 55 adynamy 56 aerodynamic 57 aerodynamical 58 aerodynamicist 59 aerodynamics 60 aerohydrodynamic 61 afterdamp 62 agathodaemon 63 agathodaemonic 64 aldamine 65 aldeament 66 aldebaranium 67 Alexandrianism 68 alodialism 69 amidosuccinamic 70 amidstream 71 amygdalectomy 72 amygdaliform 73 amygdalotome 74 amygdalotomy 75 anarchosyndicalism 76 andranatomy 77 androcephalum 78 androdynamous 79 androgametangium 80 androgametophore 81 androsporangium 82 anecdotalism 83 antepredicament 84 antepredicamental 85 antidynamic 86 antifederalism 87 antifeudalism 88 antifundamentalist 89 antisyndicalism 90 appendicocaecostomy 91 Arcadianism 92 atmidalbumin 93 attitudinarianism 94 audiogram 95 aurodiamine 96 autodiagrammatic 97 autodynamic 98 autoschediasm 99 Bardesanism 100 barodynamic 101 barodynamics 102 Basilidianism 103 bemadam 104 blackdamp 105 bokadam 106 brachydactylism 107 bradycauma 108 bradyspermatism 109 Bretwaldadom 110 cacodaemoniac 111 cacodaemonial 112 cacodaemonic 113 cadamba 114 Canadianism 115 candelabrum 116 candlebeam 117 Caodaism 118 carbodynamite 119 Cardamine 120 cardamom 121 cardiagram 122 cardiameter 123 cardiamorphia 124 cardiasthma 125 cardiatomy 126 cardinalism 127 cardiocarpum 128 cardiodynamics 129 cardiogram 130 cardiospasm 131 cardiosphygmogram 132 cardipaludism 133 cathedraticum 134 caudatum 135 Chaldaism 136 chandam 137 Christadelphianism 138 coadamite 139 cystadenosarcoma 140 Dadaism 141 dardanium 142 daydream 143 daydreamer 144 daydreamy 145 deadheadism 146 decadianome 147 decadrachm 148 decadrachma 149 dicyanodiamide 150 dodecadrachm 151 Edwardeanism 152 electrocardiogram 153 enneadianome 154 extrathermodynamic 155 gastroadynamic 156 gladiatorism 157 Gladstonianism 158 gradualism 159 grandam 160 grandame 161 Grandisonianism 162 Hadhramautian 163 Hadramautian 164 Hamamelidanthemum 165 handcraftman 166 handcraftsman 167 handicraftsman 168 handicraftsmanship 169 handicraftswoman 170 hardbeam 171 hardwareman 172 headframe 173 headstream 174 hemadynameter 175 hemadynamic 176 hemadynamics 177 hemadynamometer 178 hematodynamics 179 hematodynamometer 180 hexadactylism 181 hexanitrodiphenylamine 182 hyperacidaminuria 183 hyperadrenalemia 184 infradiaphragmatic 185 intradepartmental 186 Johnadreams 187 labdacism 188 labdacismus 189 labdanum 190 Lacedaemonian 191 ladanum 192 lambdacism 193 landamman 194 landladydom 195 Laodiceanism 196 laudanum 197 Laudianism 198 macadam 199 Macadamia 200 macadamite 201 macadamization 202 macadamize 203 macadamizer 204 macrodactylism 205 madam 206 madame 207 madapollam 208 magnetodynamo 209 Mandaeism 210 mandament 211 mandamus 212 mandarindom 213 mandarinism 214 mandatum 215 mastoideosquamous 216 Mazdaism 217 megadynamics 218 megalodactylism 219 metaphenylenediamin 220 metaphenylenediamine 221 misadmeasurement 222 Mohammedanism 223 mokaddam 224 myocardiogram 225 neuradynamia 226 nonadvancement 227 Nostradamus 228 octadrachm 229 ophthalmodiastimeter 230 ophthalmodynamometer 231 Paduanism 232 palladammine 233 Palladianism 234 palladodiammine 235 palladosammine 236 paludament 237 paludamentum 238 pamprodactylism 239 pandaram 240 pandiabolism 241 paradoxicalism 242 paralambdacism 243 paralambdacismus 244 paraphenylenediamine 245 pentadactylism 246 pentadrachm 247 pentadrachma 248 pentamethylenediamine 249 phagodynamometer 250 pharmacodynamic 251 pharmacodynamical 252 pharmacodynamics 253 Philadelphianism 254 photoradiogram 255 pictoradiogram 256 pladaroma 257 plastodynamia 258 plastodynamic 259 platitudinarianism 260 polyandrianism 261 popadam 262 preadamic 263 preadamite 264 preadamitic 265 preadamitical 266 preadamitism 267 preadvancement 268 prickmadam 269 Pyramidalism 270 Quadragesima 271 quadragesimal 272 quadragintesimal 273 quadratomandibular 274 quadratosquamosal 275 quadratum 276 quadrigamist 277 quadrilaminar 278 quadrilaminate 279 quaedam 280 quartodecimanism 281 radarman 282 radiatiform 283 radicalism 284 radioactinium 285 radioamplifier 286 radiodynamic 287 radiodynamics 288 radiogram 289 radiopalmar 290 radiotelegram 291 radiothallium 292 readmeasurement 293 readvancement 294 Rhabdocarpum 295 rhabdomyosarcoma 296 rhabdomysarcoma 297 Rhadamanthine 298 Rhadamanthus 299 Rhadamanthys 300 Ricardianism 301 sacerdotalism 302 Sadalmelik 303 saddirham 304 sadomasochism 305 sandaliform 306 Sandemanianism 307 Sandemanism 308 scandalmonger 309 scandalmongering 310 scandalmongery 311 scandalmonging 312 Scandinavianism 313 shadowgram 314 standpatism 315 stomatodaeum 316 stradametrical 317 tatterdemalionism 318 tetradrachma 319 tetradrachmal 320 tetradrachmon 321 Tetradynamia 322 tetradynamian 323 tetradynamious 324 tetradynamous 325 traditionalism 326 traducianism 327 transcendentalism 328 transdiaphragmatic 329 tripmadam 330 ultracrepidarianism 331 ultradandyism 332 ultradeclamatory 333 ultrafidianism 334 ultraradicalism 335 unadvancement 336 undergraduatedom 337 unmacadamized 338 valetudinarianism 339 valetudinarium 340 vandalism 341 Vandemonianism 342 yardarm $


        The way forward always starts with a minimal test.
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 https://projecteuler.net/about. 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 (Prior) 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 (Canon) 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)

    L*

    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