News for hackers. Stuff that matters.
Re:Perl is dying by tadzik_ on Monday October 07, 2019 @10:21AM (#21181130)
> That makes one wonder about who else is still using Perl? if any? Can’t remember the last time I’ve heard about it.

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.

Re:Perl is dying by michaelanckaert on Monday October 07, 2019 @11:02AM (#21181669)
I have the same experience. A healthy portion of my time (25% is my estimate) comes from Perl freelance work. The amount of 'legacy' systems that run Perl and need maintenance is staggering.

If it weren't for the current Python hype (AI/ML and devops), I'd have more project that require Perl than Python.

Re:Perl is dying by user5994461 on Monday October 07, 2019 @11:42AM (#21182185)
>>> 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.

The CGI example is straight copy/pasted from the official Perl guide, November 2018. https://www.perl.com/article/perl-and-cgi/

Re:Perl is dying by dumbmatter on Monday October 07, 2019 @11:53AM (#21182338)
...which says

> Warning you probably don’t want to use CGI for modern web development, see Why Not to Use CGI.

Re:Perl is dying by user5994461 on Monday October 07, 2019 @12:15PM (#21182594)
It's just a trivial example to show what the languages look like with variables, loop and print.

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.

Re:Perl is dying by wott on Monday October 07, 2019 @03:31PM (#21185007)
> The CGI example is straight copy/pasted from the official Perl guide

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...

Re:Perl is dying by nrdvana on Tuesday October 08, 2019 @11:16PM (#21199683)
It's also the only example that could possibly make PHP look good, because it's the problem domain PHP was invented for. Nobody is innovating on Perl's CGI so it's not going to make use of any improved language features from the last 20 years.
Re:Perl is dying by petre on Monday October 07, 2019 @12:56PM (#21183104)
It says the Official guide to programming with CGI.pm on the cover. This is just like a book on antique furniture restoration.
Re:Perl is dying by singingfish on Monday October 07, 2019 @08:24PM (#21187439)
There's quite a lot of perl about. It seems to have a strong niche in accommodation booking platforms (booking.com and others), and recruitment software (ziprecruiter and others). As well as big chunks propping up various enormous companies (think banks and tech).

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.

Re:Perl is dying by LordDragonfang on Monday October 07, 2019 @03:16PM (#21184823)
Perl won't become the next COBOL, as COBOL only got that way because of the reasons outlined in the article: the financial sector used it extensively, and their systems are too mission-critical and they're too afraid to break things by upgrading.

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".

Re:Perl is dying by kbenson on Monday October 07, 2019 @03:52PM (#21185225)
> 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.

Re:Perl is dying by singingfish on Thursday October 10, 2019 @07:57AM (#21213409)
Amazon and Craigslist still use it. Craigslist extensively and ongoing. Amazon according to my understanding did something with a (rather crappy) perl templating language to compile it down to C++ in a similar way to what Facebook did with PHP to hack. My understanding is that's still in use, but probably not undergoing extensive development.
Re:Perl is dying by tmaly on Monday October 07, 2019 @01:23PM (#21183456)
I have been programming in Perl since the mid 90s. I still use it every day but in more modern sense with Moo.

I am curious, how do you find clients who need Perl programmers?

Re:Perl is dying by collyw on Monday October 07, 2019 @11:54AM (#21182351)
I would quite like to do more Perl, but here in Europe I always find the salaries lower than for Python, which is my main language these days.
Re:Perl is dying by matt-attack on Monday October 07, 2019 @11:11AM (#21181771)
What’s the replacement for generating HTML fragments?

And what’s the replacement for collecting params?

I’ve used CGI.pm for both of those things.

Re:Perl is dying by ergothus on Monday October 07, 2019 @11:22AM (#21181905)
I've not used Perl as my primary language in over a decade, but it remains my favorite.

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.

Re:Perl is dying by pfortuny on Monday October 07, 2019 @11:29AM (#21181996)
You may probably want to take a look at Dancer. http://perldancer.org/

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.

Re:Perl is dying by petre on Monday October 07, 2019 @12:59PM (#21183139)
Mojolicious for almost everything web related. Minimal dependencies. We also write lightweigt event loops with it.

http://mojolicio.us

Re:Perl is dying by petre on Monday October 07, 2019 @12:52PM (#21183043)
Yup, me to. The CGI example is amusing. Are there people still using CGI.pm?