http://www.perlmonks.org?node_id=11145501


in reply to Re: Stackoverflow blog: Why Perl is still relevant in 2022
in thread Stackoverflow blog: Why Perl is still relevant in 2022

(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:

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

Replies are listed 'Best First'.
Re^3: Stackoverflow blog: Why Perl is still relevant in 2022
by LanX (Sage) on Jul 13, 2022 at 20:59 UTC
    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.