Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Stackoverflow blog: Why Perl is still relevant in 2022

by NetWallah (Canon)
on Jul 07, 2022 at 15:28 UTC ( [id://11145337]=perlnews: print w/replies, xml ) Need Help??

Girish Venkatachalam has blogged "Why Perl is still relevant in 2022" on July 6, 2022.

No new info there - it is interesting only because it purports to be positive for perl, is published on SO, and showed up on my Google news feed.

The author seems to have somewhat dated knowledge of perl and no knowledge of raku.

                "These opinions are my own, though for a small fee they be yours too."

  • Comment on Stackoverflow blog: Why Perl is still relevant in 2022

Replies are listed 'Best First'.
Re: Stackoverflow blog: Why Perl is still relevant in 2022
by Tomte (Priest) on Sep 09, 2022 at 08:37 UTC

    There is a new blog post on SO, this time concentrating on the growth of perl as a language and how to deal with new features:
    This is not your grandfathers perl

    CGI not mentioned once :) I guess someone saw the reactions to the other blog post here and thought to remedy the situation...

    regards,
    tomte


    An intellectual is someone whose mind watches itself.
    -- Albert Camus

      tbf, that's horribly underwhelming. I read that and think, sarcastically: "WOW, Perl sure has come a long way! It's hardly recognizable! It's really going to give Python some serious competition now!"

      say()? Really? This is how we're going to win converts? This is how we're going to convince people that Perl is a 21st-century language?

      I'm not saying Perl hasn't come a long way. I'm saying that article doesn't give the impression that it has, contrary to the author's implied promise. As such, it actually works against Perl, as it solidifies in peoples' minds the fact that Perl is a has-been language. "This is what the Perl community get excited about?"

Re: Stackoverflow blog: Why Perl is still relevant in 2022
by perlfan (Vicar) on Jul 08, 2022 at 17:26 UTC
    stackoverflow for those who live and die by stack overflow x-D
    @out = <$proxy>; for(@out) { chomp; ($parm,$n) = split/=/; if ($parm eq "totalmailattemptcnt") { $outh{"mails"}= $n; } elsif ($parm eq "goodmailcnt") { $outh{"goodmail"} = $n; } elsif ($parm eq "numattcnt") { $outh{"numatt"} =$n; } elsif ($parm eq "regexcnt") { $outh{"regmatch"} =$n; } elsif ($parm eq "viruscnt") { $outh{"viruses"} = $n; } elsif ($parm eq "spamcnt") { $outh{"spamcnt"} = $n; } elsif ($parm eq "relaydeniedcnt") { $outh{"relaydenied"} = $n; } elsif ($parm eq "bannedrecipcnt") { $outh{"badrecip"} =$n; } elsif ($parm eq "bannedsendercnt") { $outh{"badsender"} = $n; ...
    No wonder Perl has the rep it does.

      (This is part response and part rant...you have been warned!) I read through more of the article and finally know what your code snippet is referring to. Ouch. But this is actually a problem here at PerlMonks. I'll explain.

      I think someone familiar with Perl would read this article and grumble...'you are not helping...'

      The author has a fairly high score here on this site and, from what I have seen from his posts, can definitely write better code than that. He might have been thinking that producing simpler code would help newer developers or people unfamiliar with the language. However, that is really not helping. People need to learn more Perl by reading and trying things out. It is the responsibility of this site to educate people on this simple point.

      If we go back in time to 2019 (I purposefully did not go back too far so we could see recent results) we see one example of what I am talking about. The author's response is clearly wrong and no one has questioned him about it. See: How to loop through hash of array and convert into hash with key and value.. The answer given by the author is incorrect. The correct solution should not have had the key in the individual hashes (as shown in the expected results).

      The code provided actually produces this:

      #... 'Adam' => { 'total' => 22, 'days' => 22, 'name' => 'Adam' } #...

      There should be no name key in the hash.

      When I peruse the author's history I find more examples:

      • Re: sqlite show tables - "Here are some working snippets"...code dumping of old snippets should have gotten this author a downvote and been chided for posting irrelevant code and wasting space on the site.
      • array to string - The SQL used clearly will only return a single value (the count of users per a specific location) so I have no idea why no one (the author included) suggested using something like, $hash_ref = $sth->fetchrow_hashref to obtain the answer instead of looping to obtain a single value.

      I think PerlMonks users should avail themselves of the opportunity to point out issues with code here. Otherwise you wind up with people writing Perl articles elsewhere that do not represent this language very well. There are nothing short of brilliant posts online as well as books on Perl that can be referred to rather than writing code examples like the ones shown in the liked-to-article.

      And the rest is a mess...

      "It is still being used in CGI scripts. It is used in several sys admin tasks. Perl is still alive and kicking..."

      The entire premise behind this article is flat-out wrong. To summarize, it says 'oh yeah, Perl is still around...you can still use it for certain tasks.' Who says so? You?

      The author doesn't mention that Perl can fork or Perl can be used with Starman and other PSGI environments to achieve higher performance. No mention of the websites currently up and running using Perl (look it up -- IMDB, Zappos, Craigslist...the list goes on). There are even load balancers written in Perl. Instead the author keeps talking about CGI as if none of that exists.

      Some fellow named Steve summarized my thoughts in the comments of the article:

      "Each method and tool chain have their own strengths and weaknesses. CGI works for some tasks, Dancer works for other tasks. Use the right tool for the right job."

      Celebrate Intellectual Diversity

        AFAIS did the OP repost this SO blog entry to inform us. But he didn't write it! So what's the point in attacking him?

        Wouldn't it be more constructive to write a better opinion piece on Perl?

        You've listed valuable points, thanks for that.

        So what kind of help do you need to assemble a good article about "Why Perl is still relevant in 2022" ?

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        PS: And yes, after looking more closely, these chained elsifs with eq make me cringe too. That's obviously better solved with an extra hash-mapping. But that's true for most languages.

Re: Stackoverflow blog: Why Perl is still relevant in 2022
by InfiniteSilence (Curate) on Jul 13, 2022 at 16:53 UTC

    If you gauge popularity to be the number of questions people ask about a system then you are right -- people are asking a lot about node.js. However, you should not stop there: Google Trends shows that Perl has only lost a tiny bit of popularity compared with the plummeting interest in node.js over the past five years. Now, I'm no statistics expert but there appears to be a correlation here -- perhaps people are asking for help more and at the same time losing interest. It might be that they are running into real, almost insurmountable problems with node.js, turn to online sites seeking help, and are then giving up for something else.

    Celebrate Intellectual Diversity

      Now lets try that for a longer interval, shall we?

      Jenda
      1984 was supposed to be a warning,
      not a manual!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlnews [id://11145337]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-24 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found