Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Beginner Recommendations

by Ookma-Kyi (Initiate)
on Jan 23, 2023 at 03:57 UTC ( #11149775=perlquestion: print w/replies, xml ) Need Help??

Ookma-Kyi has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I am new to Perl. I would like to learn to code in Perl, but would like to read a physical book. Another option would be a online course on Udemy, but so far there are only a few courses on Perl. After some Googling I find that most of the suggested books are from 2010-2017 which leads me to believe the books are either old or Perl itself hasn't been updated in a long time. My ultimate goal is to is use use the Perl equivalent of Django/Spring Framework/Ruby on Rails to create a browser based mmo game. Can anyone give some recommendations for current books or course?

Thanks

Replies are listed 'Best First'.
Re: Beginner Recommendations
by haukex (Archbishop) on Jan 23, 2023 at 08:48 UTC

    Welcome to Perl and PerlMonks, Ookma-Kyi!

    After some Googling I find that most of the suggested books are from 2010-2017 which leads me to believe the books are either old or Perl itself hasn't been updated in a long time.

    Perl recieves a lot of updates - Perl 5.36 was released less than a year ago, and 5.38 is slated to come out this year. However, Perl 5 also places a large emphasis on backwards compatibility, so most of the material in older books still applies. Some best practices have evolved, so for example if you find code that looks like open FILE, ">$file" instead of open my $fh, ">", $file, then that's a good sign the example might be a little outdated, or especially if you find material that doesn't include a recommendation of use strict; use warnings;.

    If you're only going to read one book, then I suggest Modern Perl. If you want to go deeper, then see threads like So what is your Perl book "Trilogy" anyway? and especially the links in eyepopslikeamosquito's reply will give you lots of good recommendations, and here's my take.

    And of course you're always welcome to ask here!

    My ultimate goal is to is use use the Perl equivalent of Django/Spring Framework/Ruby on Rails to create a browser based mmo game.

    I personally like Mojolicious very much; after the above materials you can get started with Mojolicious::Guides::Tutorial.

Re: Beginner Recommendations
by soonix (Canon) on Jan 23, 2023 at 09:31 UTC
    which leads me to believe the books are either old or Perl itself hasn't been updated in a long time.

    There has been much effort to ensure backwards compatibility, such that older scripts run more or less unchanged on newer Perls. This means, that, while the books are "old", they (at least the good ones) are not outdated.

    I second the Modern Perl book, which is available both on paper and online.

      I second the Modern Perl book, which is available both on paper and online

      I third the Modern Perl book! :) I really love this little book, authored by an expert Perl programmer and a superb writer (chromatic) ... hmmm, this is probably a rare combination. :) This book gets to the point clearly and succinctly, not wasting time with beginner stuff because it assumes you're already a decent programmer, but new to Perl.

      So if the OP is already an accomplished programmer, it's ideal. OTOH, if the OP is new to programming in general, a gentler book, such as Learning Perl, may be a better fit.

      BTW in addition to my list of Perl book references (kindly mentioned by haukex) I keep a list of Learning Perl Links.

      This is really far from a beginner recommendation, but Higher Order Perl by Mark Jason Dominus is a brilliant book and available for free too... It assumes an intermediate level of Perl already, and hopefully a brain that's capable of digesting everything it has to offer.
Re: Beginner Recommendations
by marto (Cardinal) on Jan 23, 2023 at 09:12 UTC

    Welcome. A word of warning on online courses. I spent significant time correcting a perl course which was provided by one of the large players in this game. The test was pathetic. The answers they wanted you to select in some circumstances were impossible. The course video content was presented by one person, creation of the test was farmed out to a third party, who had no idea what they were doing. After engaging with our corporate contact to address the issues, the test was changed, with slight improvement. At the time I was working for a large Indian outsourcer, more than 34 thousand of the employees had "passed" the perl course when the test was riddled with mistakes. I've completed other courses for different technologies, I've yet to find one which was really good. So your milage may vary, just because there's a course doesn't necessarily mean the people creating the tests know what they're talking about, and people often just re-take tests selecting different answers (not necessarily the correct ones) in order to pass.

    If you are new to perl I'd echo both the advice of perlintro and Mojolicious::Lite. The Mojolicious docs has other good links to get you started. As a framework Mojolicious is powerful and makes web work fun for me.

Re: Beginner Recommendations
by Anonymous Monk on Jan 23, 2023 at 07:59 UTC
    Start with this free course that comes with every copy of Perl: perlintro

    There's lots of frameworks. I like Mojolicious. You can whip up a fancy prototype in literal minutes with the amazing Mojolicious::Lite.

Re: Beginner Recommendations
by 1nickt (Canon) on Jan 23, 2023 at 11:25 UTC

    Hi, I'd recommend Dancer2 for your application framework. It's light, powerful, extensible and originally inspired by Ruby's Sinatra.

    Hope this helps!


    The way forward always starts with a minimal test.
Re: Beginner Recommendations
by karlgoethebier (Abbot) on Jan 23, 2023 at 17:52 UTC
Re: Beginner Recommendations
by Anonymous Monk on Jan 23, 2023 at 14:15 UTC
    Tinkering with Perl, by C.J.S. Hayward is an exceptional intro to Perl written for children, and adults, written by an Orthodox monk! Chapter Zero teaches the basics of Unix but the rest is pure perl. It used to be a multipage website but has since been consolidated into a single document with deactivated hyperlinks, making it real easy to save and print:

      "Tinkering with Perl" looks like it would need an overhaul. The real tiny baby steps are good, but there's no strict, warnings, lexical scope etc.
        "Tinkering with Perl" looks like it would need an overhaul. The real tiny baby steps are good, but there's no strict, warnings, lexical scope etc.

        The author explains his method in the prefaces. Those topics are far too advanced to start teaching children a language. When I learned English as a child the first day was spent learning about the letter A. We had to write A over and over again on weird green paper between horizontal lines. It took a lot of practice to get the A consistently between the lines. We did the same thing every day for all the capital letters, but only after we mastered the previous letter. Then we learned that there is another version of letters called lowercase and we had to repeat the drill of writing each lowercase letter over and over, until we got it right. There was no mention of advanced topics like vowels, consonants or punctuation at the earliest stages of language acquisition because that would confuse and bore and ruin the child's ability and desire to learn. Remember we're talking about children here, potentially very young children.

Re: Beginner Recommendations
by Anonymous Monk on Jan 24, 2023 at 01:50 UTC
Re: Beginner Recommendations
by harangzsolt33 (Hermit) on Jan 24, 2023 at 03:12 UTC

    Not too recently I decided to learn Perl myself. I was already quite familiar with C, JavaScript, QBASIC, HTML, and x86 assembly. So, I wanted to jump into Perl quickly. I searched for free online courses. I found one called Teach Yourself Perl in 21 days. Sounds great. I wonder if there's a better one. So, I searched for Learn Perl in Hours, and I found this: Learn Perl in 2 Hrs 30 minutes. I clicked on that one! I read everything as fast as I could. I installed Strawberry Perl on my computer. I wrote example programs. I took notes. I learned as fast as I could, trying to understand the essence of it as quickly as possible. I also found these:

    Perl 5 by Example
    http://affy.blogspot.com/p5be/index.htm

    Getting Started With Perl
    http://jkorpela.fi/perl/intro.html

    Practical Perl Programming
    https://users.cs.cf.ac.uk/Dave.Marshall/PERL

    Robert's Perl Tutorial
    http://perl.sioc.org/win32perltut.html

    The volume of free courses and manuals is absolutely mind boggling! There is so much valuable information out there!

    I did not look on YouTube, because I wanted to go at my own pace. I wanted to learn fast. If you are watching a YouTube video, you are limited to the pace of the teacher. I usually don't understand their words, because English is my second language. Reading is a lot easier for me. Also, on YouTube, whenever they write an example program, the resolution is so bad that I cannot tell what they are writing or they change the screen so quickly there's not enough time to copy the program. I don't like to pause and rewind all the time. So, I think, YouTube videos aren't the best way to learn a programming language. Of course, some people like them, and that's okay. Use whatever works best for you!

    So, anyway, I started to write little programs to see if I can do this and that. Then I didn't understand something and wanted to ask a question. That's when I found PerlMonks! These people here immediately answered my questions and were very friendly. I thought this is the best language! I am really glad I picked this one. So, I haven't been disappointed.

    After awhile, I found TinyPerl 5.8 which is a very small compact version of Perl for Windows, and I decided to install that one. Strawberry Perl is like a monster compared to TinyPerl. I like small better. And TinyPerl is good enough for me. So, I have been using that ever since. It's perfectly suited for my needs. I don't use Perl for business. I use it for hobby programming. I write stuff for myself to speed up my everyday life and my work and for fun, of course. I like solving puzzles and thinking about difficult problems, and programming is also a sort of creative outlet for me.

    "After some Googling I find that most of the suggested books are from 2010-2017 which leads me to believe the books are either old or Perl itself hasn't been updated in a long time."

    Well, Perl is old, but that's not necessarily a bad thing. Imagine what would happen if the "American Association of Language Experts" decided to update the English grammar every year or so. It would drive people nuts. A piece of paper you write today might not pass the spellcheck and grammar check 3 years from now, because today language rules would be considered outdated by then. What makes a language valuable is its stability and popularity. The same thing is true about Perl. I think, the fact that it is old is a good thing! It also means that the internet is full of information about it. If you want to do something in Perl, chances are it's been done before. So, you can either just use someone else's code OR you can study someone else's code and write a better code.

    A language also becomes more valuable the more people use it. For example, the English language is used by people in Canada, the USA, England, and Australia. And you can go to a lot of other countries and find people who speak English fluently. So, it has a very wide use. And Perl is similar, because Perl will run on Linux, MacOS, and Windows which are like the three main continents in the computer world. Perl is very well established on all three. Learning Perl is like learning the English language. Not many people speak Hungarian, which is my native language, but as soon as I learned English, it opened the doors for me so I can communicate with almost anyone anywhere. Perl is a gateway to all computer systems. There are languages like JavaScript which limit you to one specific platform or they severely limit what you can and cannot do. If you only speak Hungarian, sure you can visit any country you want, but chances are nobody will understand you, and you won't understand anything they say to you. JavaScript is like that. Sure, you can run JavaScript on any computer device, but you can't read and write files and you can't do a million other things, because you're stuck within the confines of a browser.

    A word about language revisions. If you follow news about JavaScript, they are constantly adding new features to it. Unfortunately, these features aren't really essential. I mean there isn't anything new that you couldn't do before. The cool new features just exist to make programming enthusiasts excited, but the disadvantage is that the interpreter is becoming more and more complex. Everybody wants to add new bells and whistles to the language, and nobody seems to care that it comes at a price. It's causing the interpreter to become bloated and slow. I hope that Perl doesn't go that way.

      Please stop recommending TinyPerl, it hasn't been updated in many years. You're missing decades of improvements and bug fixes. It is clearly not suited for OPs requirements. Much of the responses you post start off from the flawed logic of insisting on running software that is out of date and unsafe (Windows XP, TinyPerl). These are not a sound basis upon which to build, suggesting to a beginner that there's any circumstances which this is the case is just wrong given the costless alternatives.

        I don't think I was recommending TinyPerl. I said that I am using it and I described why. I also said that YouTube isn't a good way to learn programming, but I didn't say no one should be using YouTube. The reason I use TinyPerl 5.8 is because it's tiny. lol It's only 448 kilobytes in size. Strawberry Perl, on the other hand, takes up 154 megabytes. And that's just the size of the zip file. (Btw I don't use any of TinyPerl's modules except warnings.pm and strict.pm and maybe Carp, but other than that, I don't use anything else. So, if the older modules have security issues, I am not affected by those, because I don't use them.)

        "...it hasn't been updated in many years. You're missing decades of improvements and bug fixes."

        I haven't come across a bug yet. When I do, I'll switch. If something is not broken, don't fix it. :D And that's why I am using XP also by the way. And no, I am not promoting Windows XP. Don't get me wrong. I am just saying that I use Windows XP because it works for me, and I love it. It probably won't be good for somebody else's needs. But I figured out a way to make it safe and secure for myself, so I am fine with it. And I have been using it for a long time. Believe it or not, I think, it has clear advantages over using the newest versions of Windows. Not many, but some. I'll post a link here to an article I wrote about how I do it:
        How To Make Windows XP Safe.

      If you are into retrocomputing or legacy systems, TinyPerl may be a good thing. For nowadays even "poor" computers, it is well possible to use a more current version, which eases and speeds up not only run time, but also programming itself. From perlunicode, I would infer it should be something like 5.32.
      Hi harangzolt33 thanks so much for posting such a detailed reply. I'm also a beginner and want to ask you a question, would PERL be useful in the following situations:
    • Programs and applications development
    • Systems Administration
    • Database development
    • Video game development
    • Web development
    • Secondly, how would you say PERL has the upper hand over other languages, such as Python? Thanks for reading and looking forward to hearing back from you !

        harangzolt33 isn't best placed to respond, since they insist on using decades old tools, and using them arguably badly. To respond to your points in order

        • Yes.
        • Yes.
        • Yes.
        • Not for modern FPS style games.
        • Yes.

        You're probably going to have to ask more specific questions to get a meaningful answer. Better advice already exists in this thread for places to start.

        I don't know Python. I plan to learn it one day, but that day hasnt arrived yet. I feel like marto has provided a better answer than I could. Here you can talk to real programmers who have been doing this all their life, and this is their career. I'm just a hobby programmer, so I can't give you professional advice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2023-02-01 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?