hi, i was interested if perl is still relevant in this day and age. Perl has been on the decline for a very long time now. Perl 6 (now named 'raku) not being backwards compatible with perl 5 code made the already small perl community even smaller by splitting it in half. A good example is lisp with it’s thousands of different dialects.

Is it still worth using or is it bound to legacy software forever? Like cobol.

  • glad_cat@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    41
    arrow-down
    5
    ·
    edit-2
    1 year ago

    For me, Python replaced Perl 15 years ago. I know Perl is a great language, but it’s too “write-only.” Python replaced both BASIC and Perl at the same time, even with the problems of migration from v2 to v3. Python can also do scripts to replace Bash and PowerShell. I don’t see myself learning Perl now, it would be a waste of time.

    Perl was revolutionary at the time with CGI and regexes, but it’s not needed anymore.

    • El Barto@lemmy.world
      link
      fedilink
      English
      arrow-up
      35
      arrow-down
      21
      ·
      edit-2
      1 year ago

      I wish python was not indentation aware. It has discouraged me from learning it.

      Edit: downvoted by fanbois. Look, I’m not married to my tools.

      • Muffi@programming.dev
        link
        fedilink
        English
        arrow-up
        26
        arrow-down
        1
        ·
        1 year ago

        Even if you’re writing JavaScript, you should be using proper indentation. What an odd thing to keep you from learning it.

        • El Barto@lemmy.world
          link
          fedilink
          English
          arrow-up
          9
          arrow-down
          4
          ·
          1 year ago

          Sometimes I want to write a quick oneliner or a quick algorithm to test things out. Or not worry about indentation when trying a solution I might discard in five minutes.

          With Python, I don’t have that choice.

        • dukk@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Things get messy though, when you have to break the rules of indentation once in a while or when you have “improper “ indentation. Whitespace is a stupidly messy thing. Indentation should be a style guide, not part of the language semantics.

      • richieadler@lemmy.myserv.one
        link
        fedilink
        English
        arrow-up
        22
        arrow-down
        1
        ·
        1 year ago

        If that’s your only reason, I’d encourage to try it anyway. Logical indentation is initially weird but it can be overcome very fast.

      • glad_cat@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        7
        arrow-down
        1
        ·
        1 year ago

        It has never been an issue for me in 20 years. If you move code, you cut a whole paragraph, paste, and indent appropriately.

      • treadful@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I wish python was not indentation aware. It has discouraged me from learning it.

        lol, then you just don’t like Python. You can’t disassociate the two things.

  • magic_lobster_party@kbin.social
    link
    fedilink
    arrow-up
    17
    arrow-down
    1
    ·
    1 year ago

    Perl is great for that occasional bash one liner or that one off script.

    It’s awful for team projects. The core mantra of Perl is “there’s more than one way to do it”, meaning every piece of code can be written in hundreds of different ways. Result is that everybody write with different code styles, and no one can understand each other’s code.

    So that rules out most practical use cases.

  • NeoNachtwaechter@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 year ago

    Perl hasn’t lost any of it’s qualities or relevance or usefulness.

    It’s just, with these incompatible language upgrades, they are creating artificial barriers for starters and for occasional users. The outcome is that they are making it less popular, sadly.

  • zero_spelled_with_an_ecks@programming.dev
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    I work at a small company that still uses perl for everything. It works, the company makes money. They’ll never move off it. I bet there’s a lot of little places like that, but I doubt many are starting new projects with it. Not many of the major modules have a lot of updates recently, but they’ve also been pretty complete for a long time. If you already know shell/awk/grep/etc it’s pretty easy to pick up. Probably will see less and less of it as the people that do write in it continue to age.

  • Hovenko@iusearchlinux.fyi
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    OpenQa testing framework still uses perl heavily.

    I learned perl after python and I still like the language. At the end I always treat languages as tools. There is no bad language. There is only a task and your decision to pick the correct tool for it.

  • El Barto@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Is Raku really used as much as perl? Splitting the community in half is quite the claim…

  • SwingingKoala@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    4
    ·
    1 year ago

    Perl is nice. I doubt anybody uses it to create new projects though, and if they do I’d doubt their sanity. Learn it if you want to maintain old, illegible code.

    • El Barto@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      5
      ·
      1 year ago

      The illegible code claim has always baffled me.

      You can write perfectly legible code in perl. You can write illegible code in python if you really want to.

      • richieadler@lemmy.myserv.one
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        The variable prefixes make it easy in Perl to write line noise, and there are much more “magical defaults”.

        What’s the most illegible code you have found in Python?

  • r00ty@kbin.life
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I use perl for automation stuff that needs more than bash, but doesn’t require the speed of a faster/compiled language. In my opinion it’s great for that kind of thing.

  • 9point6@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    I know of at least one big online company that still has a staggering amount of perl in their stack for 2023 (IMO)

  • simon574@feddit.de
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    I played around with Perl when I was still in school, almost 20 years ago. Even then it was pretty legacy. I remember fixing a bug in a Perl script during an internship, because I was literally the only person in the whole department who could understand Perl code. I suppose it was used for sysadmin and web scripting but has since been replaced by PHP, Javascript and Python. I wouldn’t bet any money on Perl being relevant in the future.

    • Nath@aussie.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      It was used for everything in the late 90’s. I get nostalgic when I see a bit of perl on the web these days, but I sure don’t miss it.

      • r00ty@kbin.life
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        Back in the days when we actually used usenet for discussion, there was a newsgroup called alt.possessive.its.has.no.apostrophe. Ah the olde internet.

  • frezik@midwest.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    The community is all but gone at this point. It used to have a lot of highly concentrated competance. Many of those people left (or were driven away) in the last few years, and nobody is taking their place.

    There is no such thing as a junior Perl programmer.

    My company still uses it significantly, and has already had one major failed attempt to get rid of it. I expect we’ll still have it for years to come. I’m at least 25 years away from retirement, and I wouldn’t be surprised if it was still around then. That said, we’re moving to Elixir, and with a much better plan than the previous attempt.

    All that said, we gobble up all the experienced Perl devs we can and try to make them happy enough to stay. There’s good money to be made in a long-tail language.

  • dan@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I write Perl at work. Supporting an actively developed Perl based application.

    It’s honestly not that bad as a language, the biggest downside is that the ecosystem of libraries around it are often abandoned or outdated. The language isn’t perfect and it needs a bit of discipline to avoid creating unreadable code, but honestly it’s not as bad as its reputation might have you believe.

    It has quite a few tricks and unexpected bits of flexibility that make it quite a bit more expressive than other languages - you can really craft nice compact, elegant code with it if you want to.

    These days I use other languages too (Python, Ruby, JS, etc) but none of them quite match Perl for expressiveness.

    Oh also it’s great for oneliners. That expressiveness can be abused for brevity in some really interesting ways.