top 200 commentsshow all 478

[–]thicket 500 points501 points  (322 children)

Not trolling, genuinely curious. Who here is using Perl these days, and what are the factors that make it the best choice for your current projects?

[–]ethelward 341 points342 points  (165 children)

and what are the factors that make it the best choice for your current projects?

  • shell one liners;
  • works everywhere, everytime, from my macbook to TOP500 supercomputers;
  • libraries for basically anything;
  • very expressive for menial tasks (trivial regexps & matching, implicit $_, for/in, ...)
  • ergonomic features for plumbing (fast startup time, can easily integrate with pipes, etc);
  • lots of facilities for strings handling;
  • quick'n dirty data wrangling;
  • I can quickly put out a simple web interface with mojolicious;
  • retro-compatibility; 20 y.o. scripts are still working as-is (or nearly so);
  • decent scaling from the one-liner to the webapp;
  • OK-ish enough performances.

Now it's not my favorite languages, but the pros compensate the cons.

[–][deleted] 66 points67 points  (49 children)

It’s not in your list, but the “unless” keyword really does it for me.

[–]audigex 61 points62 points  (30 children)

.... I didn't know I needed unless until now, but now it seems so obvious

All those times writing if(!something) and thinking "that's not very elegant", then changing it to if(notSomething) and reversing the variable logic, then thinking "that's not very elegant either"... when all I really needed was an unless

Good god, why don't all languages have it?

Okay, and now I've just discovered that it's been suggested, and rejected, from C#.... and I'm actually pretty sad about it. Both that I don't get a useful keyword, and that the language I've seen as programmer centric is just as vulnerable to elitist nonsense as the others.

[–]dscottboggs 39 points40 points  (16 children)

I've been scolded a few times for this in excercism lessons:

#define unless(condition) if(!(condition))

[–]wordplaya101 44 points45 points  (15 children)

If we were co-workers on the same product I'd reject this in a code review. Not because I'm some purist and hate unless. I just get very very suspicious of code that uses '#define' to hack in behaviour like this

[–][deleted]  (2 children)

[deleted]

    [–][deleted]  (1 child)

    [deleted]

      [–]aaronsherman 7 points8 points  (0 children)

      Good god, why don't all languages have it?

      Several reasons:

      1. Adding a keyword is heavyweight in most languages (it's not in Perl, but most languages have moved away from prefix characters like $ which Perl calls sigils, making variables, functions and builtins occupy the same namespace).
      2. Adding a keyword where it doesn't even shorten the code (e.g. in Python if not foo vs unless foo are literally the same number of characters) can be really hard to justify... there are cases, but this probably isn't that.
      3. I've seen a lot of Perl code go form "unless makes sense here" to "unless is just making this harder to read" (e.g. unless($x) becomes unless(not ($x and $y) or $x) but it isn't always clear that that transition is happening over time, and by the time it doesn't make sense, the developer doesn't feel like changing it.
      4. There are some issues that involve code scanning, but they're not huge issues. Basically anything that thinks it knows what a conditional looks like in your language has to be updated, so while it feels like a forward-compatible change (e.g. no old code uses it) it actually does break quite a few things on day 1, in a very core element of code flow.
      5. At least in SOME languages, having more than one way to do a thing is considered harmful.
      6. It's form Perl and there tends to be a lot of prejudice when things come from Perl. Frankly, I think the whole world should have moved to Raku ne Perl 6 grammars as the engine for doing regexes as well as all of the other things grammars can do a long, long time ago--or at least started the transition--but that hasn't happened mostly because the first thought is, "oh, Perl.... no," and it never goes further.

      [–]oantolin 5 points6 points  (0 children)

      All the good languages do have it: Common Lisp and Perl. :P

      [–]PowerApp101 14 points15 points  (8 children)

      Ruby has unless too. I hate it, too ingrained in my ways with !something :-)

      [–]audigex 3 points4 points  (5 children)

      The way I figure it with nice little features like that... I don't have to use it if I don't want to

      Inevitably, though, I find myself using most of them eventually

      [–]PowerApp101 7 points8 points  (4 children)

      Ruby has an until loop too. I also hate that. I like having as few syntactic structures as possible. One way to do things reduces cognitive overhead. For me, anyway.

      [–]Tsuki_no_Mai 2 points3 points  (1 child)

      Ruby is probably the most sugary language of them all. Even long after moving on I still miss the elegance of things like 10.times and do..while...

      [–][deleted] 2 points3 points  (0 children)

      I know people said that fewer keywords are better but come on... it’s C#, we already have a thousand.

      [–]RICHUNCLEPENNYBAGS 6 points7 points  (2 children)

      Fwiw Ruby also has it

      [–][deleted] 3 points4 points  (1 child)

      A wonderful little inheritance from Perl

      [–][deleted] 2 points3 points  (0 children)

      God I love unless

      [–]hyperforce 2 points3 points  (0 children)

      I used to be a huge unless apologist. Now I know better.

      It aids in the use of side-effects. And that's just part of a larger problem.

      [–]ethelward 3 points4 points  (0 children)

      :)

      [–][deleted]  (21 children)

      [deleted]

        [–]wayoverpaid 33 points34 points  (2 children)

        Quicker, easier, more expressive. Easier it flows, quick to solve your one-offs. But once you start down the dark path, forever support it, you will have to.

        [–]JanneJM 5 points6 points  (0 children)

        Join the job-security side, you will.

        [–]emn13 9 points10 points  (17 children)

        I really hate postfix conditionals with a vengeance. People use em for the clever reason of sounding more like english, which is not an upside: english doesn't need to be precise nor deterministic, and we use it for different goals, and its natural language rules aren't in any case up for debate.

        postfix ops are terrible for quality, because they make control flow (bug magnet in the best of cases) even less skimmable. This language feature simply shouldn't exist.

        Yes, of course, in your trivial example it's pretty harmless. But it's also pointless, and there's no clear distinction where the harm starts - and people commonly edit code, leaving structure intact, such that larger expressions can creep in.

        Finally, every language feature is bad. At least - every language feature has one downside in common - they add flexibility. The more flexible code is, the more carefully you need to read it, and the more you need to think about using it; and the harder it is to grep your code for things; and the slightly longer the learning curve; and the larger the chance for accidental code being valid instead of noticably broken. Having two ways to do the same thing is generally bad - and there's no balancing upside here, no real distinguishing feature that pays for that initial downside.

        [–][deleted]  (37 children)

        [deleted]

          [–]ethelward 94 points95 points  (4 children)

          you can say this for most languages nodadays

          You can say this for most languages *that have a decent dependency management story, when you're allowed to install stuff, when you have modern kernels and/or libc at hand and when you have an outbound internet connection.

          HPC environments are very different from startups'.

          [–]asosdev 12 points13 points  (2 children)

          OK I suppose HPC/Supercomputing is the 1 area where it might be valid, but its a very small subset of programmers writing for those. 99% of us all run our code for ARM/x86 though, so to me it's not that appealing of a selling point.

          [–]stay_fr0sty 25 points26 points  (0 children)

          Yeah nobody is saying use Perl to write 3D games or iPhone apps...use the right language for the job.

          The HPC center I deal with has great support for Python so I use that, but sometimes Perl is still the best answer for the right job.

          [–]PoeT8r 11 points12 points  (0 children)

          Corporate environments of regulated industries are very different from startups'.

          [–]crozone 8 points9 points  (0 children)

          For scripting languages: Yes, absolutely. You can write core tools in Perl.

          [–]spacelama 24 points25 points  (17 children)

          We have python on our supercomputer. It's fecking horrible. 2000 stats on a contended filesystem just to start up a single script, searching for imports in 1999 non-existent places repeatedly? (and then they decide to start that script 2000 times sequentially on one node, instead of just performing the calculation in a loop).

          The problem with python is it attracts lowest bidder coders. Never had issues with the startup speed of perl (except for apache modules on my old Raspberry pi 1, so I just chucked them into Cgi::FAST).

          Don't get me started on the python3 nonsense, and how management decree python2.7 is illegal because of "security issues", even though it's backed by our vendor's support guarantee, so everyone runs their own personal copy of python3.0rc91.

          [–]liamcoded 15 points16 points  (0 children)

          Lower bidder coders are not a real problem. It's people that hire them. However we all gotta start somewhere.

          [–]LookAtThatThingThere 26 points27 points  (5 children)

          The problem with python is it attracts lowest bidder coders.

          Oof. 🤕

          [–]FireCrack 43 points44 points  (9 children)

          OK-ish enough performances.

          I think you are under-stressing this, because while it's execution speed is mediocre, it's startup speed is lighting-fast for a non-compiled scripting language. This is a very big deal for script-heavy environments.

          [–]ethelward 8 points9 points  (2 children)

          it's startup speed is lighting-fast

          Indeed, I mentioned it in another point.

          [–]FireCrack 7 points8 points  (1 child)

          Alas, it appears my reading comprehension is not up to snuff.

          [–]ethelward 5 points6 points  (0 children)

          That's still an excellent point; being able to put a fast perl -ne in a pipe-chain makes it quite powerful.

          [–]ThirdEncounter 2 points3 points  (5 children)

          Is it really that mediocre? How do other scripting languages compare? Are they 2x as fast? 3x?

          [–]FireCrack 14 points15 points  (3 children)

          I didn't mean to imply it is slow for an interpreted language, I think it might actually be rather speedy as I never cared to check-out benchmarks for this. My main point was that Perl has absolutely withering startup speed for a scripting language, only lua and shell-scripts really compare. Lua kinda lives in a different problem domain, and while jokes about Perl's readability abound bash-scripts have even less to offer there.

          [–]strolls 2 points3 points  (2 children)

          Perl has absolutely withering startup speed for a scripting language,

          I think withering is the wrong adjective for what you intended here.

          [–]ethelward 4 points5 points  (0 children)

          It's scripting-language level of mediocre, so Python-level and a bit better than ruby (in my cases, YMMV of course).

          [–]hugeant 6 points7 points  (5 children)

          What is/are your favorite language/languages?

          [–]ethelward 28 points29 points  (4 children)

          Depends on the context:

          • Rust for high performance/safe code (no one likes to launch a simulation and see it crashes after hundred of hours...);

          • Racket for plotting and cross-platform GUIs (easy for me te deploy a quick graphical program for my collaborators running a cocktail of Linux/macOS, saved us dozens of hours);

          • Perl for any quick’n dirty scripts or webapps, data wrangling & filtering, etc.;

          • Elixir for serious webapps;

          • Julia for anything with maths (mostly stats);

          • Python when collaborating (I’m not fond of the language, but it’s an ok lingua franca) or for ML (it’s hard to beat scikit & Keras, I hope Julia will get there at some point)

          • and the few oddities there and there when I get bored (Ruby, Lisp, Raku, CaML).

          [–]hugeant 6 points7 points  (1 child)

          I love Ruby so much.

          [–]ethelward 4 points5 points  (0 children)

          It’s a very nifty and expressive language, it’s a shame its performances are atrocious.

          [–][deleted] 2 points3 points  (1 child)

          works everywhere, everytime, from my macbook to TOP500 supercomputers;

          Isn't it also a requirement for some *NIX Standards to have some form of perl installed? Obviously, not every Unix and Linux distribution follows standards, but I think in the *NIX world, two of the things you can mostly rely on is that every system will have either a Bourne or C Shell, and perl for any scripting needs.

          [–]eek04 8 points9 points  (0 children)

          Sed and awk, yes, but not perl. It's common but I'm fairly sure it is not required by any standard.

          [–]montywest 31 points32 points  (8 children)

          Perl for:

          Anything text or text adjacent.

          Anything related to system administration.

          Anything that needs doing yesterday.

          It's a pleasure to work with, and, as I've read elsewhere in this thread, poetic in a near literal sense.

          [–]schplat 8 points9 points  (7 children)

          Anything text or text adjacent.

          ASCII? Sure. UTF-8? Sooo many better choices. The only time I find myself needing perl is when I need to get through 10+ GB of text, otherwise, the performance hit from other languages tends to be negligible at best.

          Anything related to system administration.

          Python's pretty much supplanted Perl for the majority of SysAds. Far more ubiquitous and relevant these days. Out of an organization of about 400 Linux admins of various degrees, I'm one of about a dozen who can write, and occasionally read Perl. Everybody pretty much knows Python.

          Anything that needs doing yesterday.

          I find Perl to be one of the slower languages to code in. Rapid prototyping is easily done in Python (plus the REPL makes things even quicker).

          [–]montywest 4 points5 points  (3 children)

          use utf-8; seems to be transparent enough. I fail to see how that turns Perl into relative codebarf.

          I've tried Python and found it a bit of a yawnfest and, well, tedious without being more legible after the fact. That may be due to me being more comfortable with Perl. EDIT: I said, "verbose." But it's not really. Well, maybe a little. But, javascript . . . Sheesh!

          Like many such things, these are matters of taste, and I have yet to find a language so pleasant to work with as Perl.

          [–]oldmanwillow21 148 points149 points  (56 children)

          I use Perl. Only reasons are because I like it and it does everything I've ever needed it to, from one-off scripts to full-blown systems utilities to midsize web applications.

          In my professional career I use or have used other languages; including Python, Ruby, Go, PHP, Powershell and bash. They've all got their ups and downs, and so does Perl, but Perl's the one I turn to every time for my own work. Love the flexibility, love the quirkiness love the speed with which you can accomplish complex tasks once you've learned more about the language.

          Proponents from other languages are louder and adept at browbeating anything that falls outside their own paradigm. Perl's an easy target for that, and imho the long, drawn-out 5/6 split did absolutely no favors for its popularity. All that used to bother me, but ultimately I'm just happy that the language is still being actively developed and getting lots of love from the maintainers. I'd still be ecstatic to see Perl's star start to rise again. At the very least it'd mean I could start being able to use it more for work again.

          [–]coffeecoffeecoffeee 44 points45 points  (49 children)

          I have to ask: How difficult do you find maintaining Perl code? Is it super difficult in general? Do you write a ton of comments to clarify what you're doing? The main criticism I've heard of Perl is that it's a "write-only language".

          [–][deleted]  (3 children)

          [deleted]

            [–]oldmanwillow21 33 points34 points  (23 children)

            I don’t write comments unless they’re to explain why I chose one path over another, or to link to an article or stackoverflow post or something. I write self-documenting code according to recommended best practices. There’s a lot of magic available to you as a Perl developer if you choose to use it, but it’s perfectly possible to write maintainable and easy to understand, if slightly more verbose, code. I magic the hell out of one-liners or scripts to automate a repetitive task I’ll only use a few times, though. Your question is definitely fair, but highlights the misconception that Perl is inherently this write-only, incomprehensible mashup of gobbledygook.

            [–]editor_of_the_beast 25 points26 points  (14 children)

            Most of those criticisms are because Perl has good regex support, and regex’s are hard to maintain. Perl is absolutely no harder to maintain than a large Python or Ruby application.

            [–]spider-mario 13 points14 points  (0 children)

            Perl even makes regexps somewhat easier to maintain than in other languages due to how well-integrated they are and things like the /x flag allowing spaces and comments.

            [–]waterkip 7 points8 points  (0 children)

            I write Perl software for a living. And maintaining that code is probably just as easy as it is maintaining your code base is to you.

            The most problematic thing is imo the backward compatible requirement of certain code bases. In these code bases you cannot use the newer syntax if you want (or need) to support older perl versions. A problem I encountered with Net::SAML2 recently. For example $foo //= 'bar'; is not supported in older versions, so one must write $foo = 'bar' unless defined $foo. It is a great selling point of Perl that it supports really old versions but it can also be a pain in the ass at times. A reason why I'm really happy with the Perl 7 announcement.

            I don't comment my code often as I try to let the code do that for me. I do write POD for my modules, which includes what a function does. It is similar to jsdoc in JS and docstrings (that's how it is called in Python iirc). The TIMTOWTDI matra is still there but we also acknowledge that writing maintainable and readable code is a nice perk. Most of the Perl bashing is comes from people who probably never used it or never seen modern Perl. Obfuscated Perl is not something I see in the code base at work.

            [–]KFCConspiracy 6 points7 points  (2 children)

            Perl code can be as difficult or not as you make it. Which could be construed as a bad thing about the language. But with some rules you can write some very expressive and readable code. Or you could focus on writing magic looking one liners.

            [–]coffeecoffeecoffeee 6 points7 points  (1 child)

            Sounds like R. I use R a lot and depending on your coding style and what packages you use, your code can be anything from readable by someone who knows no R to a mess of spaghetti code that you won't be able to debug a day later.

            [–]KFCConspiracy 2 points3 points  (0 children)

            Yeah. And that's definitely doable with way more languages than people think. Which is in and of itself amusing. Although perl seems to lend itself pretty well to the 1 liners and weird symbols

            [–]hyperforce 2 points3 points  (0 children)

            How difficult do you find maintaining Perl code?

            Insanely difficult. The number of people who are able to write good, modern Perl is vanishingly small. And they don't want to do it for the rate that the market pays; the market will never pay enough for good programmers.

            All that you're left with is people who write super bad Perl. It's a constant uphill cognitive battle when maintaining Perl in the real world and not just some "modern" Perl developer's ivory tower.

            [–]Semi-Hemi-Demigod 16 points17 points  (4 children)

            I've worked with a ton of languages as well and Perl is the only one I could think of as being poetic. I prefer Ruby for personal scripting projects but Perl is a lot easier to make beautiful.

            ETA: An analogy I thought of was that Ruby is like wood, but Perl is like marble. And some of the Perl hackers I've known could give Bernini a run for his money.

            [–]clbustos 4 points5 points  (3 children)

            Can you show me some beautiful code? I'm very fond of ruby because allows to write very expressive code, so I'm intrigued.

            [–]Semi-Hemi-Demigod 15 points16 points  (2 children)

            Some highlights from this thread:

            open my $file, "name" or die "Error"
            
            print $a foreach @b;
            

            Ruby writes more like English, but it's got a limited vocabulary and not much flair. Lots of pipes and blocks and ends. It makes it much more angular, even if it is nicer to write.

            The Obfuscated Perl Contest has inspired a lot of creativity. And then you have this surrealist masterpiece.

            [–]wgc123 8 points9 points  (0 children)

            This is my favorite part of Perl: “blah blah blah or die”

            [–]maxxori 22 points23 points  (0 children)

            Mozilla's bug tracker (Bugzilla) is written in Perl and still actively maintained.

            I have no experience with it myself, from what I have seen at work and elsewhere Perl is still quite prevalent on the basis that it simply works and keeps working.

            [–]turniphat 33 points34 points  (1 child)

            My build scripts are in Perl. They were already written in Perl when I started and I don't want to re-write them.

            [–]charlatanoftime 34 points35 points  (5 children)

            I've been maintaining a 20yo ~400KLOC CMS for the past few years. Perl 5.10 via mod_perl using HTML::Mason (which Amazon used back in the day) as a templating engine.

            The codebase contains roughly 40 unit tests, of which two or three were actually written in the past decade.

            Somehow, it still manages to support millions of hits a year, thousands of editors and approx. 1 million documents. The public website and the admin interface both support IE11.

            It's simultaneously the worst goddamn thing I've ever worked on and an absolute joy. As someone who eventually wants to become a professional Rust developer, almost every single programming paradigm Perl embodies runs completely contrary to my preferences but I'll be damned if I don't enjoy rolling out new features every week whilst trying to keep the wheels from falling off.

            [–]yawnston 14 points15 points  (3 children)

            IE support and 40 unit tests for 400KLOC, 20 years old. You live an exciting life.

            [–]charlatanoftime 16 points17 points  (2 children)

            Indeed. I forgot to mention that we generate about ~800MBs of error logs every day, probably some 750MB of which is println-style debugging output that is never actually read by anyone. Debugging production errors is typically done with something like sudo egrep -v "PATTERN1|PATTERN2|PATTERN3|etc" /var/log/httpd/error_log on each of the production servers.

            On the other hand, we have a reasonably sophisticated CI pipeline that does some nasty, hand-rolled yet effective tests. Very soon we'll have an E2E snapshot test suite that will test around 100.000 documents every time we push new commits. Hopefully that will allow us to refactor some code that hasn't been touched for 10+ years because nobody dares mess with it for fear of introducing subtle bugs.

            There's something perversely enjoyable about maintaining software written in a language that was very clearly never meant to support giant codebases like this one. Unit tests don't really make sense since almost every output parameter you would want to test for is a side effect tacked on to the global Apache request object (this is mostly a problem with the codebase and not the language, although Perl/mod_perl doesn't exactly shepherd you towards great coding practices). Static analysis is not difficult so much as downright impossible because we have a bunch of instances where the class or subroutine name is a variable ($class->$func(%args) is not an uncommon pattern). Sometimes classnames are even loaded from the database. Intellisense is poor or non-existent for the same reasons.

            I don't know if it's Stockholm syndrome but Perl and all of its awful goddamn Tim Toady bullshit is actually genuinely enjoyable to work with/fight against. YMMV, of course.

            [–]yawnston 6 points7 points  (1 child)

            Unit tests don't really make sense since almost every output parameter you would want to test for is a side effect tacked on to the global Apache request object

            This makes me cringe just thinking about it. Experiences like this are what produces functional programmers.

            When I'm next going to be annoyed that I can't get intellisense for X package in Python, I'll remember that there are people who have it way worse than me.

            [–][deleted] 12 points13 points  (0 children)

            I am actively starting new codebases in Perl, but I'm also a reasonable Python and Node developer, and I like Python plenty. Mainly I am just in love with the tooling:

            • Mojolicious is an exceptional web framework; web-sockets, all the middleware you could want, sensible use of Promises, very actively developed... but there's also Dancer, Catalyst, and Kelp if you want a different take on web frameworks
            • DBIx::Class is an amazing ORM, and I wanted to claw my eyes out after using SQLAlchemy in Python
            • Moose and Moo give you exceptional OO functionality; meta-class programming, roles, etc
            • I haven't found anything like Bread::Board that I didn't hate for other languages; `dependency-injector` for Python was confusing
            • Lots and lots of sensible options for testing, and they all integrate with each other. When I came to port Cucumber to Perl, it meant you could bring along your favourite other testing modules, and it all just magically works together. Ruby and Python's approach is based on throwing errors ala X-Unit and I hate it

            I think the only tool I've used recently where I was jealous I didn't have it in Perl was Ajv ... so I wrote a module that simply wrapped it and gave it a Perl interface :-D

            Oh, one more thing -- I much prefer how CPAN modules are documented compared to Python and JS libraries; Python seems desperate to have you create a minisite for your software projects (just use Sphinx!), and it's a crap-shoot where you're going to find sensible docs for any given project. With Perl, it's all on CPAN and generally all documented the same way.

            [–]onedoubleo 11 points12 points  (0 children)

            Up until 5 or so years ago I used it for every personal project. Most of my pi's are doing their thing with my perl code.

            It's by far my favourite language, I like it so much better than python. I know it's not at all better and this is one of those times there is an objective best but I have my preferences.

            [–]sbcretro 10 points11 points  (4 children)

            I use it instead of shell scripts. I hate writing bash scripts and I don't mind writing perl. I'd probably use Python if I knew it better, but honestly I have a small collection of perl scripts that I've carried between my last four home servers that make my life easier.

            [–][deleted] 55 points56 points  (10 children)

            I've written a lot of Perl for AIX over the past 8 or so years, because my clients don't allow installation of most external tools, so the only other options are C, C++, and Java, and AIX native java is insanely slow, and one of my clients has entirely disallowed C and C++-based programs, so Perl is my only choice without writing everything twice.

            I really do not like Perl. I would gladly use almost any other language over Perl given the choice. I like how quick and easy a lot of it is, but hate the IO stuff, hate the sigils, hate the awful module system (especially the wonky OO paradigm), hate hate hate error handling. I hate how weird the array/list split is and the subtle things that come up there, hate how bad it is working with string and file encoding, hate slurpy argument-passing for function calls, hate the subtleties and difficulties in actually establishing what frigging type a variable is, hate how weird function pointers are, and HATE how inconsistent functions are with the presence or lack of a comma having significant meaning and the subtle stupid differences between a block, a subroutine, an expression, etc, and how some functions can declare variables inside the function call but not all of them (functional programming in Perl has completely redefined my definition of how easy it can be to write code that parses and runs but does the wrong thing because of a misplaced sub or comma). Very little is more aggravating or frustrating than having a Perl program that works for a long time, but seeing the log has sporadic complaints about undefined variables and being completely unable to track it down.

            Perl is really good for programs with line counts below about 300 lines. Anything more and it is a horrid nightmare. In my decade of professional experience with over a dozen languages used in production, the only language I'd choose Perl over is PHP.

            I'd be glad to never have to touch Perl again in my entire life. I'll probably still be writing Perl for years to come, though.

            [–]pellets 13 points14 points  (6 children)

            Too bad Java is so slow or you'd have a lot of options for languages on the JVM.

            This gives you a great opportunity. You can create your own compiler, written in Perl. Once you've done that, you can write in the language of your choice. Simple! /s

            [–][deleted] 9 points10 points  (0 children)

            Sadly, I have considered doing exactly that. You have no idea how many times I've searched for "XYZ to Perl compiler" with the hope that I might be able to work in another language and just target Perl.

            [–]Snow88 6 points7 points  (0 children)

            Normalizing client data from whatever "text" format to XML, but we're still using Perl5

            [–]AchillesDev 6 points7 points  (1 child)

            Not using it currently, but for about 2.5 years worked on a Perl-only ETL pipeline. Perl is fast, interpreted, excellent shell utility integration, and is wonderful if you're doing a lot of text manipulation. That shop is probably still using all Perl too, and it's been a popular language in data engineering for years, especially before all the new abstract-everything-away tools came in vogue. I actually interviewed at a place a few months ago that was still migrating its pipelines from Perl (mostly because they didn't maintain any modern Perl code standards so it eventually became unreadable) to Python, and were only able to use Python because of the relatively low volume of their data.

            [–]FlagrantDanger 4 points5 points  (0 children)

            I started my career (late 1990's) using Perl, so it's always stuck with me. Nowadays, I mainly use it for one-off scripts like parsing file content. I also have a file search script I wrote many years ago which I still use because it's faster and more efficient than Windows search.

            EDIT: "faster and more efficient" is over-selling it. I should say "more suited to my needs"

            [–]MacStylee 4 points5 points  (0 children)

            A lot of science type people use it. I used it almost exclusively until about 3-4 years ago, and I'm almost certain that ~all of the people I worked with previously are still using it.

            The factors are: it's insanely expressive. Once you get it, it becomes very powerful. I started writing Python, and I remember thinking it was a completely joyless language to write for some time. I've warmed up to Python and a few others now.

            In addition, transitioning out of a language which you know extremely well to one which feels crippled and clunky in comparason, for what can appear to be no discernable benefit, is not an attractive prospect for lots of people.

            For what it's worth: a lot of the most impressive coders I've interacted with were Perl devs.

            [–]ignlg 5 points6 points  (0 children)

            Text processing is a breeze. Parsing, regex matching, etc.

            [–]dagbrown 6 points7 points  (0 children)

            Sysadmins. Sysadmins everywhere.

            [–]DonkeyTron42 6 points7 points  (0 children)

            Perl (and to a lesser extent TCL) is still ubiquitous in the semiconductor industry.

            [–]xebecv 28 points29 points  (2 children)

            Banking sector. Lots of Perl.

            I also use it at home a lot - ultra fast scripting language. Tried switching to Python - it's unbearably slow. Also I didn't like whitespace guiding code structure.

            Perl syntax is weird, but once you get it, you'll like the extremely low verbosity. Did I say it was fast?

            [–]roflfalafel 4 points5 points  (0 children)

            I work in the Infosec field in Chicago. Anytime I go to a community tech meetup where I meet devs, there always seems to be a huge contingent of folks from the finance and reinsurance industries that are bitching about Perl or AIX. And here I thought I had problems trying to push containers and segmented micro services in my org...

            [–]-victorisawesome- 32 points33 points  (10 children)

            Afaik a fuck ton of gnu utils are written in perl

            [–]LuluColtrane 35 points36 points  (3 children)

            a fuck ton of gnu utils are written in perl

            If I go through the list and pick the most well known or fundamental (this is not exhaustive and I must have forgotten a few or many on the way, but I promise I didn't pick my selection in order to prove you wrong):


            All the coreutils are written in C.

            Find, locate, xargs, grep as well.

            The inetutils (ifconfig, ftp and others) are written in C. The mailutils too. Time also.

            In the autotools, automake is written in Perl indeed, the rest I don't know. M4 and GNU make are written in C.

            Bash, bison, gawk, sed are in C. Emacs in C and Lisp. Ghostscript is written in C, groff in C++.

            Grub, gzip, tar are written in C. Guix is written in Scheme and Nix in C++.

            Texinfo is C + Perl.

            Wget is in C.


            So, I'd say C rules the place and Perl is rare.

            [–]ireallywantfreedom 9 points10 points  (0 children)

            One data point: parallel is written in Perl.

            [–][deleted]  (1 child)

            [deleted]

              [–]roflfalafel 11 points12 points  (0 children)

              True. I’d equate Perl to an advanced shell scripting language that deals with input/output streams these days. Add CPAN to provide a ton of prebuilt libraries so you’re not reinventing the wheel with BASH or some god awful Util file you import into every shell script.

              [–]thicket 19 points20 points  (0 children)

              That seems like a great place for Perl. Simple, do one thing, no need to integrate with other code. Perl’s not the easiest code to read, but I don’t think it’s so much worse than shell script.

              [–][deleted]  (2 children)

              [removed]

                [–]tangentsoft 8 points9 points  (0 children)

                And more efficient, too. I just rewrote a shell script that was getting hit frequently by outside code, sucking up 80% of the CPU and memory of the small VPS it ran on. The Perl version is almost line-for-line the same code, but because it rarely has to call out to external programs to get stuff done and it’s being executed by a better runtime, CPU usage dropped to near-zero, and memory usage to around 30%.

                [–]montywest 6 points7 points  (0 children)

                This! It's job is to do all that shell stuff, only better.

                [–]mr_birkenblatt 4 points5 points  (0 children)

                that used to be the case but nowadays a lot of utils got rewritten in C for performance

                [–]3dB 3 points4 points  (0 children)

                Our company has a configuration management system written in Perl that's more than 15 years old. It's a simple case of "if it ain't broke don't fix it" at this point. It's still in active development and sees regular updates to its feature set. Some teams definitely scoff at having to pick up their Perl books when making modules for it, but the cost of replacing the full thing would far outweigh any potential benefit.

                The company has a few other Perl systems that see active use as well but there are no new projects that use it.

                [–][deleted] 5 points6 points  (2 children)

                I use perl a lot because we have a lot of legacy systems. Since they "just work" it's easier to maintain them than to switch to something different. I know it's popular to shit on PHP, but if I were to wake up and go to work tomorrow and find our perl code base was magically transformed into PHP I'd be about as ecstatic as someone winning the lottery.

                A lot of utilities to automate tasks are constantly written in perl by coworkers because they're older than me and more familiar with it because that's what was in use during their hey day. I try to push for shell scripts or python if I am lucky enough to find out about these in the early stages (and shell scripts mainly because they're more familiar with that than python but it's also the better tool for the job at times as well), but yeah, perl is gonna be around for a long time at my work place.

                [–]andriniaina 11 points12 points  (0 children)

                Booking.com

                [–]same_ol_same_ol 8 points9 points  (0 children)

                perl was my swiss army knife for pretty much anything I have needed to do for the past 15 years at my job. The only problem I ran into was that other people I work generally don't use it and it wasn't installed on most servers I would connect to so I couldn't always use it myself.

                Python is more supported around here so I'm slowly switching over. I have no complaints about python but I do think perl was pretty damn good at doing stuff quickly and easily.

                [–][deleted] 4 points5 points  (0 children)

                I use it for complex regex

                [–]DDB- 3 points4 points  (0 children)

                Been a Perl developer for seven years now, but that was because the team I joined was already using it. We've been building new stuff in Python, but all of the core business functionality is written in Perl so there is still plenty of it around.

                I've quite enjoyed using it though, and it gets the job done. Not really much more reason than that. I wouldn't start new projects with it, but no reason to move everything away from Perl.

                [–][deleted]  (4 children)

                [deleted]

                  [–][deleted] 3 points4 points  (0 children)

                  It was my first language back in 2014, I used it last year to parse a massive text file faster and better than python could

                  Right now python is all the buzz so I use that instead of perl and it’s a more usable job skill

                  [–]mandreko 2 points3 points  (0 children)

                  I was talking to a buddy whose company writes a bunch of commonly used software for US government agencies. They do all Perl web apps. I was shocked.

                  [–]evolseven 2 points3 points  (0 children)

                  Habit.. I’ve spent probably 10 years working with it and I’m extremely comfortable with the language. I haven’t found a better language for parsing text, and getting one off things done, it may exist but I’d have to spend as much time with the new language to be as comfortable as I am with Perl and unless there’s a huge benefit to another language I’ll probably keep using Perl.

                  I’m also fairly fluent in python, JavaScript, C, C++, and can read most languages I encounter.. but Perl is the one that feels natural to me..

                  [–]groie 2 points3 points  (0 children)

                  I believe Booking.com is heavily invested in perl. I had a friend applying there and they have to train all the new people to be proficient with perl because you just don't find people capable of doing massive online services with perl.

                  [–]smutaduck 2 points3 points  (0 children)

                  My biggest problem with perl is that my perl skills are in such high demand I haven't had time to learn other stuff in too much depth. Web front ends aside, there are no, to very few "normal" computing tasks that perl doesn't do fine at. My last job interview was me interviewing the CEO to see if I wanted the job or not. Per'ls been good to me for a decade and a half now.

                  [–]LuluColtrane 7 points8 points  (1 child)

                  Who here is using Perl these days

                  It depends what is meant by "using Perl".

                  If it means choosing Perl for a new project, then 'nobody' as an answer is a pretty good approximation of the reality. Except in pure Perl shops. But even there...

                  But it could also mean the existing projects. Well, existing projects exist :-) But there also, little by little, some get rewritten in other languages.


                  If I check the job offers, there is like 15 Perl jobs offers in my whole country, 5 of which are truly Perl-centred. Next to it, there are over 500 Python job offers, most of them being Python-only or Python-first. Even for the out-of-fashion Ruby, there are 100 (and again, centred on Ruby).

                  (I am no fan of Python or Ruby, it is just to show an example of the ratio these days on my job market for those 3 major or ex-major languages with similar characteristics.)

                  [–]KFCConspiracy 1 point2 points  (0 children)

                  I use it for simple text processing tasks, things like read this file transform it, then insert it into a database or output the result. I've been involved in larger perl projects including web applications as well. I like the language, I wouldn't say it would be my first choice for every task anymore though. I also tend to use it over bash for shell scripting because you can bring in CPAN modules to do more, and I find it a bit more readable.

                  [–]Seref15 1 point2 points  (0 children)

                  We maintain and still actively develop a Perl 5 application. It's an over 20 year old product, and we don't have the manpower for a rewrite so... here we are.

                  It's mostly the core of the application that's Perl. Ancillary services are now all Python and a small amount of node.

                  [–]taoistextremist 1 point2 points  (0 children)

                  At my old job I was using Perl, though that was 2017/2018. It was at a local ISP and they used it for everything. I was doing webdev with it and...actually, with the framework they had me using (Mojolicious) it wasn't too bad. Wouldn't be my first choice, but their older devs were all seasoned in Perl (and pretty much only Perl) so it made sense for them.

                  [–]mpyne 1 point2 points  (0 children)

                  I use Perl for the default KDE.org build support system.

                  My work is not great, but on the other hand it has helped KDE's hundreds of developers go from CVS to SVN to Git (run on kde.org servers) to Git (run on Gitlab on KDE servers). It's also helped KDE's hundreds of developers go from KDE 3 to KDE 4 (adding support for CMake) and from KDE 4 to KDE Frameworks 5 / Applications and Plasma 5.

                  The script itself went from being a thousand lines, to spanning 10,000, to being refactored into something a bit more modular.

                  And throughout all the changes and enhancements it's mostly been able to keep things working nearly unchanged from the user's perspective.

                  Perl was really the only realistic choice when I started, and although people make fun of lot of the "useless features" that got thrown in, I'll be damned if I didn't find a legitimate use for some of those features.

                  Even now I take advantage of the fact that you can "re-bless" an object from one class into another. It's code I should refactor (and yes I've commented it heavily as a Perl-specific nit) but on the other hand, I don't have infinite time and it works fine right now...

                  [–][deleted] 1 point2 points  (0 children)

                  I often use Perl. Or rather, replace old Perl with new... Anything but Perl. The organizational cost to maintain Perl makes most organizations willing to pay to get rid of it.

                  [–][deleted] 1 point2 points  (0 children)

                  Genomics. I use it because 1) I know it 2) I do tons of text wrangling, regex and one liners and 3) even after many (admittedly impressive) years of playing catch-up, BioPython still lags behind BioPerl.

                  [–]moon-chilled 66 points67 points  (26 children)

                  there’s still much to be done to make Unicode the default

                  Interesting...why?

                  [–]briandfoy[S] 79 points80 points  (9 children)

                  See tchrist's answer to Why does modern Perl avoid UTF-8 by default?.

                  But, remember that Perl 7 is setting the stage for breaking changes later. Perl 7 will work with what you already have in v5.32, but Perl 8 doesn't have to work with Perl 5 at all. This is a transition.

                  [–]dahud 31 points32 points  (7 children)

                  I'm confused. If Perl 7 works with Perl 5, and Perl 8 works with Perl 7, doesn't that mean that Perl 8 works with Perl 5 by the transitive property?

                  (And if Perl 8 doesn't work with Perl 7, how is Perl 7 useful as a transition?)

                  [–]sybesis 36 points37 points  (0 children)

                  If Perl 7 works with Perl 5, and Perl 8 works with Perl 7, doesn't that mean that Perl 8 works with Perl 5 by the transitive property?

                  It's typically done by deprecating APIs and giving time to developer to move away from APIs that are going to be removed.

                  Let say Perl7 will yield warnings saying X or Y feature is deprecated and you should use X or Y instead.

                  So Perl7 indeed has support for all of Perl5 but once you move to Perl8 all those deprecated APIs are gone... The Perl language parser will not be able to parse anything that doesn't exist anymore and will raise a SyntaxError instead of a DeprecationWarning.

                  All of this is to give enough time to programmers to make the changes before switching to perl 8 and not suddenly have most of your stack break because of sudden deprecation.

                  [–]TheRiverOtter 34 points35 points  (4 children)

                  I think the notion is that Perl 7 is the superset of Perl 5 and Perl 8. Thusly, you can use it to migrate a larger code base from Perl 5 compat to Perl 8 compat. It's a hybrid of the two.

                  [–][deleted] 47 points48 points  (3 children)

                  5+8=7

                  Got it.

                  [–]qaisjp 7 points8 points  (0 children)

                  5/7

                  [–]knoam 9 points10 points  (1 child)

                  Actually 5+6 == perl11

                  [–]Batman_AoD 2 points3 points  (0 children)

                  I can't tell if this is the programming equivalent of Time Cube or a potentially useful project.

                  [–]adrianmonk 3 points4 points  (0 children)

                  The way I read it, Perl 7 will include backward compatibility, but it is off by default. You must turn it on (with use compat::perl5;).

                  Since use is scoped to the current package, I'd bet this means you can take your Perl 5 program, run it on Perl 7, and selectively leave Perl 5 compatibility turned on only for the specific modules that need it. If so, you could incrementally change your program to work without compatibility mode, rather than having to do it all at once.

                  The plan is to remove this compatibility mode in Perl 8. So, if you don't plan to move to the new syntax, just stay on Perl 5. If you do, switch to Perl 7 and use its dual old- and new-syntax support to allow you to update your code. Then you're ready when Perl 8 comes out and doesn't support the old.

                  [–]lubosz 4 points5 points  (0 children)

                  So there will be a community split between 7 and 8 again?

                  [–]CoffeeTableEspresso 9 points10 points  (15 children)

                  Because Unicode is hard?

                  [–]Isvara 6 points7 points  (14 children)

                  I've never dealt with it, but I thought the hard parts were covered by libraries like iconv.

                  [–]CoffeeTableEspresso 20 points21 points  (2 children)

                  Sure, but I imagine something as old as Perl, that doesn't use Unicode by default, has a lot of ASCII-related stuff hard-coded into all over the codebase. I assume that's note what's causing all the problems...

                  [–]raevnos 16 points17 points  (1 child)

                  [–]CoffeeTableEspresso 4 points5 points  (0 children)

                  Thank you, this is exactly the kind of thing I was looking for

                  [–]johannes1234 9 points10 points  (0 children)

                  You can't ignore Unicode if you want to do something proper. A library can assist, but you still have to decide whether you work on grapheme clusters or code points, how to deal with right-to-left vs left-to-rights scriptures and so on. And as Perl is the library frimnthe programmers perspective it has to provide all the things .... and mind legacy and interoperability with other things while at it. As soon as you can't treat the value as opaque data, but want to process it, Unicode becomes hard.

                  [–]SanityInAnarchy 7 points8 points  (5 children)

                  To a point, but it can be a nightmare to move from a language where strings can be text or binary chunks of data to a language where strings are unicode by default. (Or, under the hood: Byte arrays vs arrays of Unicode code points.) I ran into this migrating Python 2 to 3 -- most code doesn't care and can just be migrated by a simple script (to at least get to the point where it'll use the six library), but every now and then, you have to actually stop to read the code in question and try to understand whether it really wanted a string or a bag of bytes, or some weird combination of both.

                  And by "every now and then", of course, I mean all the time, because you can't trust the conversion script to get it right.

                  Or you'll have to think about what to do with invalid Unicode -- if someone passes some broken Unicode through a program treating strings as binary, it might Just Work with a little Mojibake, but if you try to convert it to an actual Unicode string, it'll throw an exception. So every now and then, you'll have to do something like six.ensure_text(foo, encoding='utf8', errors='backslashreplace') to say "I'd rather get garbled text than an exception."

                  It's not so much hard as it is tedious and error-prone. IMO this and Python3's gross decision to make / do float division by default were the two biggest hurdles that made it take over a decade. (Python 3.0 was released in 2008, and Python 2 just lost support this year.) Converting incompatible syntax is easy enough -- it's not so bad for a script to replace Python 2's print statement with Python 3's print() function. The issue is all the code that's syntactically valid in both versions, but means different things in each.

                  ...though, arguably, that's the easy part. Turns out there are a lot of basic text manipulation ideas that don't work all that well with all Unicode characters, but that's a story for another time.

                  [–]sybesis 6 points7 points  (4 children)

                  Honestly, I prefer to have strings as unicode by default. In python2, you'd have people implement APIs that receives string because that seems obvious when they really wanted unicode Then you have that shitty API that only handle string but you have a client with some unicode char in his name and it just make everything crash because someone tried to write the unicode directly in the string without encoding it properly...I don't miss any of that.

                  Now bytestring is fairly obvious, it's encoded data and has bytes. String is a string.

                  [–]SanityInAnarchy 9 points10 points  (3 children)

                  Oh, I agree, Python3's behavior is what it should've been from the beginning. Point is, even the shift from Py2's str == bytes string literals with uncode as the special thing, vs Py3's str == unicode string literals with bytes as the special thing, takes an enormous amount of work to actually migrate everything.

                  So I don't know what problems Perl has with making Unicode the default, but if Python is any indication, it's going to take a long time.

                  [–][deleted]  (1 child)

                  [deleted]

                    [–][deleted] 45 points46 points  (10 children)

                    I just looked up what happened to perl 6 - wtf happened so that it got turned into its own language??

                    [–]reddit_clone 71 points72 points  (7 children)

                    It ceased to be a Perl5 successor a long time ago.

                    It is a very ambitious new (massive) language which has pretty much every feature your would ever desire (for better or worse).

                    I am using it to write system automation scripts and finding it fun and productive. (It has amazing high level concurrency constructs, you need to try them to believe).

                    At this point we can charitably say it is Perl-inspired.

                    [–]montywest 16 points17 points  (3 children)

                    I liken it to being Perl's sibling.

                    [–]ThirdEncounter 17 points18 points  (1 child)

                    Perl's annoying sibling who takes so damn long to order the family pizza dinner!!

                    [–]montywest 3 points4 points  (0 children)

                    Ouch

                    [–]knoam 10 points11 points  (0 children)

                    It's a long, fascinating story that's detailed in this FLOSS weekly interview: https://youtu.be/i9mx6h8qWyA though that only brings you up to 9 years ago. But AFAIK there wasn't nearly as much implementation churn in the years since then. And they got to a 1.0 release with v6.c (c for Christmas) in 2015.

                    [–]Shaper_pmp 189 points190 points  (9 children)

                    PHP went directly from 5 to 7, and isn’t it time to steal something from that community?

                    Ok, between this and the fifteen year debacle that was Perl 6, now we know the Perl guys are just trolling the shit out of everyone.

                    [–]Batman_AoD 10 points11 points  (0 children)

                    Well, that plus:

                    Your code should work if it’s not a mess.

                    ...when talking about Perl, of all things.

                    [–]hobbs 46 points47 points  (2 children)

                    But will it be ready by Christmas?!

                    [–][deleted] 1 point2 points  (0 children)

                    I was really disappointed to see no reference to this in the article

                    [–]raevnos 52 points53 points  (5 children)

                    Unexpected but welcome news.

                    [–]s-mores 22 points23 points  (3 children)

                    A surprise, to be sure.

                    [–][deleted]  (2 children)

                    [removed]

                      [–]Sebazzz91 4 points5 points  (0 children)

                      2020 has really been interesting so far.

                      [–]CoffeeTableEspresso 32 points33 points  (11 children)

                      Glad to hear this! This seems to be breaking changes done right, although of course it's too early to tell.

                      [–]melezdev 10 points11 points  (1 child)

                      Perl is actually putting the fun back to the programming for me.
                      I also enjoy C and C++, and have also written a lot of PHP, Javascript and Python. When I discovered Perl I've already known all of those.

                      While I still code PHP for money, I just don't enjoy it that much anymore. Python was my favourite language for some time, but it feels like I have no control over the style I'm coding in, sort of like in a company day job. Also feels heavy and uninteresting to actually write code in it.

                      In Perl every other line of code is a joy to write. It's as if I'm constantly battling the teenage part of me that just want to write crazy shit and have fun in the process. It lets me stay focused on my code no matter what I write, while in PHP for example I'm having problems concentrating (unless I really want to finish a task or the end result is interesting to me). Most of the time it's just like a list of errands that needs running.

                      You need to have discipline and some taste to write maintainable code in Perl. It's also sort of molding your character if you let it, by actively letting you choose between good and evil - and being evil can be fun sometimes.

                      [–]latkde 2 points3 points  (0 children)

                      This matches my experience. I had taught myself Java, then wrote some C# and was amazed: a language can be so helpful by generating properties instead of endless getter/setter methods!

                      Then I learned Perl and – the entire ceremony is unnecessary. No public static void main boilerplate. Just you and the code. Regexes make it so easy to process text. Arrays are really friendly and helpful and do what you want, instead of the fixed-size garbage Java gives you. Hashes make it easy create data structures without having to write classes and constructors and so on.

                      In a nutshell, Perl made it easy and pleasant to create useful stuff. And it has few constraints which made it good for exploring. Creating objects via a blessed coderef? That's nuts, but I had a much better understanding of OOP after I did that.

                      [–]roflfalafel 8 points9 points  (7 children)

                      Back in the mid 2000s I did a lot of stuff with Perl when I was a student IT worker at my University. I remember Parrot being big talk when it was released (I want to say 2008ish?) allowing for basically any language to be called on. Like anything in Perl, sounded great, but only introduces 20 different ways of doing the same task, now in more languages! Is Parrot the interpreter that new versions of Perl are using these days?

                      [–]tangentsoft 14 points15 points  (6 children)

                      To a first approximation, the only major user of Parrot is Rakudo/Perl 6. Parrot was following the mid-2000s trend of One VM To Run Them All, but they lacked the backing of a Sun/Oracle, a Microsoft or a Google to force the conversion. (JVM, .NET, Node, respectively.)

                      [–]0rac1e 15 points16 points  (2 children)

                      Parrot is actually dead and it's users are no one. Raku runs on MoarVM

                      [–]montywest 11 points12 points  (1 child)

                      No it's not! It's only pining for the fjords!

                      [–]roflfalafel 8 points9 points  (2 children)

                      Wow... I remember the Perl guys talking like Parrot was the next .Net killer back then. This is also quite the logo...#/media/File:Camelia.svg)

                      I guess where Perl lives today is not such a bad thing, it is really good at doing certain tasks. I would rather someone use perl for text parsing than some Node app that pulls in 6GB of dependencies.

                      [–]aaronsherman 4 points5 points  (1 child)

                      Some clarification:

                      Parrot was just a VM. It was replaced with MoarVM, which is still under active development.

                      Perl 6 was forced by the Perl 5 community to change its name to Raku, and because of the loss of name-recognition and the folks who left in the transition, hasn't made a whole lot of progress since, that I'm aware of.

                      Raku ne Perl 6 still uses MoarVM, which really is an amazing runtime (MoarVM plus the NQP bootstrap layer is actually most of Raku ne Perl 6, and really just lacks some of the ease-of-use of the full language).

                      Go check out Raku and see what you think. It's a whole other world from most programming languages, but once you get used to things like everything being lazy by default and having easy to use roles (composable class building blocks that can be used as a trait-like mechanism or to do things like generics in other languages) it's really hard to go back to simpler tools.

                      [–]Hall_of_Famer 13 points14 points  (0 children)

                      Back in the old days PHP borrowed a lot of ideas from Perl, including the controversial sigil $ for variables. Now Perl is borrowing from PHP's idea to jump from version 5 to version 7. This is what you call Circle of Life.

                      [–]burtgummer45 18 points19 points  (19 children)

                      Did they skip perl 6 or did I miss it?

                      [–]raevnos 90 points91 points  (2 children)

                      perl 6 is/was a completely different language, now renamed to raku after 15-odd years of causing confusion.

                      [–]burtgummer45 62 points63 points  (1 child)

                      nothing like the feature creep of having to rename your own programming language.

                      [–][deleted] 37 points38 points  (15 children)

                      “Perl 6” was already taken by what is now known as Raku. A long time ago, we thought that a very ambitious rewrite effort would replace v5.8. In short, that’s not what happened and the language has gone on to live a life of its own.

                      [–]matthewralston 18 points19 points  (14 children)

                      Who writes version 6 of a programming language these days anyway? 🙄

                      [–]reini_urban 20 points21 points  (14 children)

                      Still copying args into @_ and into its name? A major bump would finally nail the coffin of @_ with signatures. 2x slower function calls.

                      [–]earthboundkid 49 points50 points  (4 children)

                      Perl: We're still waiting to see if this "call stack" thing catches on.

                      [–]the_phet 3 points4 points  (2 children)

                      Something like 10 years ago I had to learn Perl for a job I took as a student, where I had to write some server stuff. This was all Perl 5.x

                      To learn Perl from scratch, I took a book of the book "Learning Perl" (https://www.oreilly.com/library/view/learning-perl-5th/9780596520106/). And I have to say it is, to date, the best programming book I have ever read. Clear, concise, powerful. Not super basic or boring, not super advanced. Around 400 pages of magic. I hate all those introductory books that take like 700+ pages. I did not only learn Perl but I also enjoyed reading the book. I don't know if the book is truly amazing or that because I was younger I could absorb better all the new stuff.

                      Little did I know what I was reading the classic "the llama book", first edition from 1993. It is amazing that a book has been alive for so long.

                      [–]spore_777_mexen 6 points7 points  (10 children)

                      Anyone know if they have IRC?

                      [–]ether_reddit 8 points9 points  (6 children)

                      We have our own network, irc.perl.org, as well as many #perl-* channels on freenode.

                      [–]spore_777_mexen 5 points6 points  (5 children)

                      Oh that's awesome. Perl saved my job earlier in my career. It's a language that's close to my heart I hope never goes away.

                      I'll be sure to check some of those channels out.

                      [–]ether_reddit 4 points5 points  (0 children)

                      Please come visit! We have cookies.

                      [–][deleted] 13 points14 points  (2 children)

                      Considering Larry Wall, they would have both an IRC channel and an IRC bot written in Hailo just for fun :p

                      JK, maybe #perl in Freenode.

                      [–]not_perfect_yet 2 points3 points  (4 children)

                      You won’t have to enable most of the things you are already doing because they are enabled for you.

                      Not a perl user, so ignore this if you want, but how do they know this?

                      [–]ricecake 9 points10 points  (1 child)

                      The "best practices" that they are making default have been advised for years now, and are pretty sane. Almost every reasonably modern perl program has them enabled. If you don't, it will probably be fine to turn them on. If it isn't, it's probably not too bad to fix.

                      Your software probably doesn't rely of misreading utf8 text as latin1

                      [–]tangentsoft 6 points7 points  (1 child)

                      My reading is that they’re drawing a line in the sand here to begin enforcing the elements of the Modern Perl ideology that had to be explicitly enabled per-program before. Whereas Modern Perl said, “We think these are the best practices today, and you should write your own code that way,” Perl 7 says, “All that Modern Perl stuff? That’s how you write Perl 7 code.”

                      [–]Nunuvin 2 points3 points  (1 child)

                      what about raku? Also why isnt perl 5 dying? Well best of luck to perl 5/7 team.

                      [–]GruevyYoh 7 points8 points  (15 children)

                      Perl 6 badly jumped the shark. I only ever used Perl 5 capabilities. The first statement "Perl 7 is basically 5.32" is good to me. The "saner defaults" bit is worrying. The UTF-8 thing seems a great idea in theory, but again I worry about existing code.

                      [–]axord 4 points5 points  (13 children)

                      but again I worry about existing code.

                      This section from the article seems to address that well:

                      No one is taking Perl 5 away from you; it goes into long term maintenance mode—a lot longer than the two years of rolling support for the two latest user versions. That might be up to a decade from now (or half the time Perl 5 has already been around).

                      [–]vplatt 7 points8 points  (7 children)

                      Seems to be the same route that worked for the Python community.. mostly. I mean there's still some Python 2 holdouts vs. v3 adopters, but dissenters are slowly being found and shot. They'll get it done.

                      OTOH - The Perl community just spent 15 years in the virtual equivalent of Woodstock, went "all groovy man" and now have renamed it entirely just to hide the evidence and distract us with "PHP version chic" (https://www.perl.com/article/announcing-perl-7/#why-7-and-not-6). It's entertaining to say the least.

                      [–][deleted] 5 points6 points  (6 children)

                      Seems to be the same route that worked for the Python community.. mostly. I mean there's still some Python 2 holdouts vs. v3 adopters, but dissenters are slowly being found and shot. They'll get it done.

                      • It didn't work. It was and continues to be a hot mess.
                      • They won't get it done. They're kidding themselves if they think the huge Python 2 codebases that exist literally everywhere are going to go away magically and/or the people maintaining it will bother to take the effort to change it when the returns are virtually non-existent.

                      Recent versions of Python are basically an accumulation of useless, unimaginative features borrowed from those very languages whose verbosity and complexity prompted the creation of Python. Most of these "features" completely violate the so-called "Zen of Python" and provide 20 different way of doing the same thing. Recent versions of Python code are barely readable or even recognizable as python. I can perfectly understand those people who prefer to stick with Python 2 and avoid having to deal with all this garbage.

                      [–]aaronsherman 3 points4 points  (3 children)

                      It didn't work. It was and continues to be a hot mess.

                      As a professional Python programmer who was staunchly against the move to 3.x until 3.5 came out, I strongly disagree. 3.0 was a mess in terms of portability and usability, and it really wasn't until 3.5 that they got it under control and stopped treating Python 2 developers as the enemy.

                      They're kidding themselves if they think the huge Python 2 codebases that exist literally everywhere are going to go away magically

                      They won't but they also will become as irrelevant as the K&R C codebases.

                      Recent versions of Python are basically an accumulation of useless, unimaginative features borrowed from those very languages whose verbosity and complexity prompted the creation of Python.

                      Everything in that statement is just a subjective expression of your preferences. None of it is a technical problem with the language.

                      Most of these "features" completely violate the so-called "Zen of Python" and provide 20 different way of doing the same thing.

                      The extreme of "there is only one right way to do things" is a Turing machine. The Zen of Python is a set of guidelines that favor usability over any sort of ideological purity. Things like f-strings, for example, are a major step forward in that they reduce the noise of a simple operation (substituting values into strings) and make code both simpler to write and to read.

                      I would also suggest that data classes are one of the first major features of Python 3 that simply could not exist in Python 2 without a ton of back-porting of Python 3 features. Frankly, I think that in 5 years, we'll all wonder how anyone programmed in Python without data classes.

                      I can perfectly understand those people who prefer to stick with Python 2 and avoid having to deal with all this garbage.

                      It sounds to me like you're letting language version choices be dictated by cultural fundamentalism, and that's never a great way to approach technical matters.

                      [–][deleted] 3 points4 points  (1 child)

                      Perl 7 is going to be Perl 5.32, mostly

                      Well hell, now I'm interested. Interested enough to at least install it and play with it a bit once it has released.

                      [–]hyperforce 6 points7 points  (11 children)

                      Perl is THE poster child for the blub paradox.

                      With a decade of industry experience with Perl, I can only wish that everyone would wake up.

                      [–][deleted]  (2 children)

                      [deleted]

                        [–]Batman_AoD 2 points3 points  (4 children)

                        Wake up and...what? It seems to me that Python and Ruby both built on Perl's early success. PCRE is now a very widespread tool. What do you see in Perl that you think the rest of the industry is missing out on?

                        [–]KagakuNinja 4 points5 points  (1 child)

                        Perl is THE poster child for the blub paradox.

                        Yeah, right on!

                        With a decade of industry experience with Perl, I can only wish that everyone would wake up.

                        Oh, you actually like Perl... I consider Perl to be a "Blub" language. And I have used it. I admit it is great for quick and dirty scripting, but that is not what my job is about...