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