If it weren't for the current Python hype (AI/ML and devops), I'd have more project that require Perl than Python.
The CGI example is straight copy/pasted from the official Perl guide, November 2018. https://www.perl.com/article/perl-and-cgi/
> Warning you probably don’t want to use CGI for modern web development, see Why Not to Use CGI.
CGI is not used to deploy web applications anymore, I am aware of that. That's a far leap from saying the module is "broken, bad and wrong".
Another commenter pointed out that there are typo in the example so it doesn't work.
I don't know any official Perl guide? This is a blog post.
The illustration image (I gather this is what confused you) is from a 1998 book...
Perl lacks uniformity of syntax which is sort of a problem, but it does excel at helping to manage the mess that is real world problems.
Personally aside from getting sucked into ~ 30% devops over the last few years, I've had trouble finding decently paid work that isn't perl. Last time I got laid off I had an alternative offer within an hour.
Contrast with Perl, which was mainly used by niche hackers (in the original, respectful sense), used in the types of products that live by the SV valley motto of "move fast and break things".
Umm, no, I think you have a very poor idea of what Perl was and is used for, and who used it. I imagine Perl is still in heavy use (if not heavy development) in the back-end of some Banks. Perl was also used to power many of the web circa 1999. Some of the big names that used it are Amazon and Craigslist. Perl was one of the main languages used on the internet pre-2000. Much has changes since then, but let's not rewrite history to completely ignore Perl's role in where we are today.
I am curious, how do you find clients who need Perl programmers?
And what’s the replacement for collecting params?
I’ve used CGI.pm for both of those things.
I never used CGI.pm for generating HTML...the idea of using functions for tags seemed unneccusarily dense when HTML is a string and Perl is well suited to handling strings. Later I shifted to templating modules like HTML::Template and Template::Toolkit. I assume those are long defunct, but vfb the point is that they offered better functionality than CGI.pm
For parsing params, yes, I used CGI.pm.
I have not used it but I have heard it is as lightweight as you want (in the sense that it may be huge but you only need to use the basics if that is all you need).
But it has been quite a while since I last used Perl for cgi.
Perl, like many other languages, has its own bubble. I'm using Perl daily at work. I used Python for a while, but the Perl job market was just too nice to pass. I have a backlog of clients interested in Perl work longer than I can handle, and they don't mind my requirements because they have no one to replace me with.
Is that a sign of a dying language? Probably yes. But to be honest, if it's about to become the next COBOL then I'm looking at a lifetime of profitable work with little to no competition :)
BUT: > Nothing personal with Perl. Just doing stats
Perhaps a little bit of research could help your point as well. The CGI example you mentioned is broken, but is also using a module (CGI.pm) that's been bad and wrong for so long that even Perl, with its eternal love for backwards compatibility has removed it from Perl Core. That's a sign of Perl's marketing problem, yes, but it's hardly a real indication of a language that's too old to care about fixing itself.