8 ms·
Do you have any good examples of how to get started with Perl?
by cglong 5y ago
Do you have any good examples of how to get started with Perl?
- eCa 5y agoSlightly related to your question, if you do get started with Perl you might find Task::Kensho[1] useful. It is a curated list of recommended CPAN[2][3] distributions for various tasks. CPAN is vast, so it is useful also as an introduction to CPAN itself. [1] https://metacpan.org/pod/Task::Kensho https://metacpan.org/pod/Task::Kensho [2] https://metacpan.org/ https://metacpan.org/ [3] https://en.wikipedia.org/wiki/CPAN https://en.wikipedia.org/wiki/CPAN
- walterbell 5y agoIs there a good chance of those distributions supporting Perl 7?
- eCa 5y agoI would presume that most (if not all) code that runs on Perl5 v32 will also work on Perl7. (Based on what I know about the plans for Perl7.)
- kbenson 5y agoI wish I could be confident that Perl 7 was actually going to see the light of day. Honestly, I was extremely excited when they announced it, and hoped it could make a real difference. The lack of real status information since then (even past the proposed initial release date) along with the implosion of the a lot of the core community and steering, is honestly what finally broke me from thinking anything could be salvaged for the future. If Perl 7 is actually still coming and there's real progress there, then there's a spectacular messaging fail going on. Perl's been my go-to language for well over 20 years, and it's the first thing I reach for when writing anything new. The problem is I'm having a harder and harder time justifying that decision. I built something small with Deno for the first time a few months back because I both wanted to try out typescript and I wanted something that I could easily turn into an executable on windows. The built in features (compile to an executable, limited security exposure based on runtime flags) and the ability to go far past JS because it as TypeScript built in all put a lot of stuff with Perl in stark relief. These are features you get when you have people actively trying to solve people's problems, iterating on substantial new and better things, and you have users (or potential users) with problems to solve. Perl 7 is/was possibly Perl's last chance to pull itself out of the ashes and try to offer something new to pull new people in and bring old users back, and I'm just not sure there's enough of a community left to pull it off. That's extremely sad, but ignoring it won't make it any less true as I see it. Hopefully I'm wrong.
- Grinnz 5y agoThe original proposal for Perl 7 was good at grabbing attention, but not good at being something that could reasonably be accomplished by the current set of core developers - it would require either maintenance of two forks of the language (not feasible), or sunsetting of Perl 5 (risking it all on unlikely adoption and migration to the new fork, and likely losing several volunteer developers). The current status is, roughly, planning for Perl 7 to be a compatible release with good features, and waiting until such a featureset is ready. See https://perl7faq.grinnz.com https://perl7faq.grinnz.com
- kbenson 5y agoThe way I read it (which might have been reading between the lines), is that whatever 5.3x was released with Perl 7 would be the last in that line, but it would never die, and just get bug fixes. I viewed Perl 7 as a way to break from the expectations of the two types of existing Perl users. Those that use it for stuff they expect to continue working without fail in perpetuity, relying on Perl's exceptional forwards compatibility, and those that are willing to break that to usher in new features that are long overdue. At work we have Perl in production that's well over two decades old, and all stages in-between because it's always been the core language of our department. The expectation that it "just works" for the most part on newer OS distro releases with newer Perl is extremely valuable to us. At the same time, new development in it has gotten more and more cumbersome over the years, both in relation to other options and in itself, as modules for newer services and APIs are less likely to be available and well maintained. Perl 7 as an idea was exciting to me because I viewed it as a way to both satisfy the needs of the job I'm in (through a static Perl 5 version), and also my personal tastes by allowing Perl to evolve and change as needed, and add some long overdue features (or even just change defaults to be sane for the current time).
- Grinnz 5y agoYou were reading between the lines, and the initial announcement was writing between them. But like I said, it is not feasible to maintain a LTS Perl 5 next to a fork of the interpreter. The actual proposal was only even to maintain Perl 5 for a few years before sunsetting it. CPAN would not have been compatible with Perl 7, it would require a separate ecosystem of code and installed libraries. The ideas sound nice but I don't think a lot of people would have been happy with how the details would have worked out. Most of the problems you're talking about are more a deficiency of perception and tooling, and these can be addressed without such drastic measures.
- Farow 5y agoYou can start from the official tutorial: https://perldoc.perl.org/perlintro https://perldoc.perl.org/perlintro
- hkt 5y agoIs the camel book (o'reilly) still relevant? I found it really helpful back in the day.
- asicsp 5y ago8th edition was released this August: https://www.oreilly.com/library/view/learning-perl-8th/9781492094944/ https://www.oreilly.com/library/view/learning-perl-8th/97814...
- roywashere 5y agoAlso: Modern Perl, 4th edition http://modernperlbooks.com/books/modern_perl_2016/index.html http://modernperlbooks.com/books/modern_perl_2016/index.html
- markoman 5y agoYes, this is "the Llama book" -- Learning Perl. Next to read would probably be Intermediate Perl, and then probably "the Camel book", which is Programming Perl.
- pkrumins 5y agoWorld's #1 Perl advocate and fan checking in. Start with the greatest books every written: Programming Perl - https://www.oreilly.com/library/view/programming-perl-4th/9781449321451/ https://www.oreilly.com/library/view/programming-perl-4th/97... Continue with the second greatest book ever written: Intermediate Perl - https://www.oreilly.com/library/view/intermediate-perl/0596102062/ https://www.oreilly.com/library/view/intermediate-perl/05961... Followed by equally amazing book by the greatest programmer in the world: Higher Order Perl - https://hop.perl.plover.com/ https://hop.perl.plover.com/ And of course: Mastering Perl - https://www.oreilly.com/library/view/mastering-perl/9780596527242/ https://www.oreilly.com/library/view/mastering-perl/97805965... To get super quick in the command line, also you might want to get my book: Perl One-Liners Explained - https://nostarch.com/perloneliners https://nostarch.com/perloneliners Finally, join #perl on Libera Chat. AS A NEW USER WE LOVE YOU WITH GREAT HUGE LOVE. (Also screw all Python programmers, what a bunch of losers with their indenting rules and PEPs. Weirdos. Whenever you hear somone say Python is good or interesting, run.)
- Grinnz 5y agoFor the record, shitting on other languages does not represent the values of Libera #perl. Though I personally would not use python or PHP, use whatever gets the job done.
- bloopernova 5y agoI unabashedly love this comment. As a somewhat "new" sysadmin/coder back in the early 2000s, those blue O'Reilly books were like a business card, comfort blanket, and encyclopedia all in one. I'd add "Mastering Regular Expressions" and maybe "Perl Best Practices". Oh and definitely "The Perl Cookbook", because it mirrored the way I learn best; from needing to do "a thing" and finding an example that mostly fits what I need.
- pkrumins 5y agoYESSSSSSSSSSSSSSSSSSS
- 5y ago
- citrin_ru 5y agohttp://modernperlbooks.com/ http://modernperlbooks.com/ is a good introduction to the language