zlacker

What Killed Perl?

submitted by speckx+(OP) on 2025-11-19 10:25:25 | 199 points 429 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
◧◩◪
31. autarc+xN[view] [source] [discussion] 2025-11-19 15:43:54
>>cestit+iL
I was writing a comment asking if it was really easier. Then I took a look at Cython. Yes, this looks easier than Perl's XS, which I have some experience with! There are ways to do something similar in Perl these days, notably https://metacpan.org/pod/FFI::Platypus. But these are relatively new (starting in the 2010s) compared to the history of Perl, and Cython goes back to the early 2000s.
◧◩◪◨
45. cestit+UP[view] [source] [discussion] 2025-11-19 15:55:47
>>autarc+xN
Somewhere in the continuum from SWIG through XS and on to Platypus there are also the Inline modules these days. They allow one to put inline sections of other languages into Perl code the way many language tools used to allow one to inline assembly into C or Pascal code.

There are some of these modules for other languages than those listed here, a lot of them as high level as Perl (including Raku and even another Perl system for some reason).

https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod

https://metacpan.org/dist/Inline-ASM/view/ASM.pod

https://metacpan.org/dist/Inline-CPP/view/lib/Inline/CPP.pod

https://metacpan.org/dist/Inline-CPR/view/CPR.pod

https://metacpan.org/pod/Inline::Lua

https://metacpan.org/dist/Inline-Java/view/lib/Inline/Java.p...

https://metacpan.org/pod/Inline::Guile

https://metacpan.org/dist/Inline-SLang/view/SLang.pod

There are even tools to convert from Inline to XS for C and C++.

https://metacpan.org/dist/InlineX-CPP2XS/view/CPP2XS-Cookboo...

https://metacpan.org/pod/InlineX::XS

55. juancn+NX[view] [source] 2025-11-19 16:35:33
>>speckx+(OP)
I haven't written perl in a long time but I cannot put a finger on why I stopped using it.

It used to be my goto language for quick and dirty scripts that needed somewhat non-trivial text processing.

Anyway, this made me think of the 2008 Damian Connway Perlcon keynote:

    "Temporally Quaquaversal Virtual Nanomachine Programming in Multiple Topologically Connected Quantum-Relativistic Parallel Timespaces... Made Easy"
If you've never seen it it's worth a watch: https://www.youtube.com/watch?v=HzTjPx4NIiM
58. ojosil+iY[view] [source] 2025-11-19 16:37:29
>>speckx+(OP)
Perl was the internet in 1990s. People (me) who were doing unix systems work (C, shell, Perl and some DBs and FTPs) could now quickly throw a CGI script behind an Apache HTTP server, which tended to be up and running in many unixes :80 port back then (Digi, HP, Sun, etc). Suddenly I had a working app that would generate reports directly to people's browsers or full-blown apps on the internet! But Perl CGI did not scale at all (spawn 1 short-lived process per request will choke a unix fast), and even after mod_perl [1], that got quickly superseded by PHP, which was really built for the web (of the 1990s). Web frameworks and fastcgi arrived too late to Perl, so internet Perl was practically dead at the turn of the century.

The enterprise, who either did not have any webapps or had tried Perl CGI first and suffered it dearly, got pinged by their sales reps that Java and .NET (depending if you were a IBM, Sun or MS shop) were the way to go, and there they went with their patterns and anti-patterns for "scalable" million-dollar web stacks. That kicked-off the age of the famed application servers that resist up until today (Websphere, Weblogic, etc).

So Perl went back to being a glue language for stitching up data, C/C++ and shell, and that's how the 2000s went by. But by then, Ruby and Python had more sane communities and Ruby was exciting and Python was simpler - Perl folks were just too peculiar, funny and nerdy to be taken seriously by a slick new generation that coded fast and had startup aspirations of the "only $1B is cool" types. Also the Perl6 delusion was too distracting to make anyone event care about giving Perl5 some good love (the real perl keeping servers running worldwide), so by the 2010s Perl was shooting down to collective ostracism, even though it still runs extremely well, fast and reliably in production. By the 2020s the release cycles were improved after Perl6 became a truly separate project (Raku, renamed in 2019), the core has gone through a relative cleanup and finally got a few popular features in demand [3]. The stack and ecosystem is holding up fine, although CPAN probably needs some good tidying up.

The main issue with Perl at this point is that it has not been a target for any new stuff that comes out: any cool module, library, database, etc that is launched does not put out a Perl api or a simple example of any kind, so it's up to the Perl community to release and maintain apis and integrations to the popular stacks on its own, which is a losing game and ends up being the nail-in-the-coffin. By the way, nothing (OSS) that comes out today is even written in Perl. That reduces even further the appeal of learning Perl.

Strangely enough, lately Perl has seen a sudden rise in the TIOBE index [4] back into a quite respectable 9th position. TIOBE ranks search queries for X language and is not much of a indicator, being quite noisy and unreliable. My guess is that those queries are issued by AI agents/chats desperately scraping information so that it can answer questions and help humans code in a language that is not well-represented in the training datasets.

[1] mod_perl was released in 1996, and became popular around 1999: https://perl.apache.org/about/history.html

[2] PHP was released 1994, took off ~1998 with PHP3: https://www.php.net/manual/en/history.php.php

[3] Perl's version changes simplified: https://en.wikipedia.org/wiki/Perl_5_version_history

[4] https://www.tiobe.com/tiobe-index/

60. leejo+F21[view] [source] 2025-11-19 17:01:06
>>speckx+(OP)
I may blog about this next year, again[^1], as I'm working on a project that sort of covers it - not in a way that will answer the question but more observational.

Anyway, I feel Perl's popularity was hugely exaggerated in the mid to late 90s and early 00s. The alternatives were either not there in terms of language and toolchain features, ease of use, "whipuptitude" or whatever, or library support (CPAN was a killer app), or they were too old school or enterprisey. Sysadmins were using it everywhere so it got into all sorts of systems that other languages couldn't without much more faff.

Its back compatibility meant it stayed in those places for a long time. It's still in a lot of those places.

The fall in popularity the last decade or two was more of a regression to the mean, or perhaps below the mean. Many other languages have come along, which have contributed even more to the fall in share.

Yes, yes, Raku (né Perl 6) but I'd argue that also contributed to a lot of really good stuff on CPAN. The Perl 5 core did get neglected for a number of years, as @autarch says, which may have been a factor.

[^1] previously: https://leejo.github.io/2017/12/17/tpc_and_the_end_of_langua...

◧◩
67. Beetle+aj1[view] [source] [discussion] 2025-11-19 18:19:47
>>JSR_FD+OH
> Maybe to use as a better Bash?

If you know Python, just switch to xonsh (https://xon.sh/). I've been using it as my primary shell since 2018.

73. cidd+Al1[view] [source] 2025-11-19 18:28:06
>>speckx+(OP)
This reminds me of the april fools email from Richard Stallman to rewrite Emacs with Perl https://www.gnu.org/fun/jokes/gnuemacs.en.html
◧◩
76. bright+Nn1[view] [source] [discussion] 2025-11-19 18:36:40
>>autarc+ZJ
All good points. There was a solid talk on modern web dev with Perl at the Carolina Code Conference last year.

Created some interest in several people who talked to me about experimenting with it for a while afterwards.

https://youtu.be/ommhbiRx-vI?si=qwkdU1Wo7uVBVse9

136. nabbed+XA1[view] [source] 2025-11-19 19:36:32
>>speckx+(OP)
Back in 1994, Perl was an amazing thing to me (as someone who was accustomed to mainframe scripting languages up to that point), and it helped make me very productive. But it sometimes would seem like the epitome of "Write once, read never". Tim Bray even remarked on its abstruseness back in 2003:

https://www.tbray.org/ongoing/When/200x/2003/07/31/PerlAngst

143. dgunay+ZB1[view] [source] 2025-11-19 19:41:24
>>speckx+(OP)
I have great love for Perl, but I'm not super eager to go back to using it.

I used it in probably one of the more cursed contexts I've ever heard of. Understand[0] is a static analyzer for many languages, and one of its killer features is that it is programmable with a Perl API. I used this feature at a defense consulting job to help target audits of huge, multi-million LOC codebases.

Perl's expressivity was very useful here. I cut my teeth on functional programming concepts to write some very nice traversals. The runtime environment of the host program was a nightmare to deal with though.

[0]: https://scitools.com/

172. rsync+0I1[view] [source] 2025-11-19 20:10:13
>>speckx+(OP)
All of rsync.net and "Oh By"[1] are coded in perl.

Which is to say, the customer facing web interface, ordering, management and our own management back ends.

Obviously the actual storage component employs no interpreters of any kind.

Alive and well!

[1] https://0x.co

◧◩◪◨⬒⬓
191. chucka+hM1[view] [source] [discussion] 2025-11-19 20:33:45
>>worik+RB1
> f*^&%k off

Hey you're writing perl already! ;)

Sorry for being salty earlier, but learning a language still takes at least a day or two of solid reading of the official manuals. https://perldoc.perl.org if you want a web version.

◧◩
205. shagie+nP1[view] [source] [discussion] 2025-11-19 20:48:52
>>JSR_FD+OH
The question is "what do you want to use it for?"

There are a few places where you might dig and find a perl script under the covers. Some that aren't replaceable with bash (and sed and awk).

I suspect that my "diff these two java deployments and create a file by file update script to run on the remote machine" in perl is still running for doing incremental deployments... and if someone uncovers it its still something reasonable to understand.

However, if I was tasked with that today... dunno. I'm not sure I'd reach for the same tools as I did then.

> In devops is turtle all way down but at bottom is perl script.

https://x.com/DEVOPS_BORAT/status/248770195580125185 (2013)

> If you can not able use Perl for answer, you are ask wrong question.

https://x.com/DEVOPS_BORAT/status/280900066682757120 (2012)

... and while I can't find the original - this might be your answer.

> We have 3 strike rule for devops: 1 strike we are take away Perl. 2 strike we are take away bash. 3 strike we are give PowerShell.

https://gist.github.com/textarcana/676ef78b2912d42dbf355a2f7...

◧◩◪
238. kvemko+532[view] [source] [discussion] 2025-11-19 21:50:52
>>kaashi+5o1
> Python 2 to 3 took a really long time

It took AdaCore so long to port the plugin system of the GNAT Studio (GPS) to Python 3 (which seems to be a fraction of the whole code base), that even conservative Debian had to remove the whole GNAT-GPS package.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082332

◧◩◪◨
245. LexiMa+y72[view] [source] [discussion] 2025-11-19 22:14:49
>>true2o+L42
I will never forget Mercurial's postmortem on their experience with the Python 3 transition. They had very few kind words to say about the process.

https://gregoryszorc.com/blog/2020/01/13/mercurial's-journey...

Part of me even wonders if the transition had any role to play in why Mercurial gradually lost whatever foothold it had in the DVCS ecosystem.

329. killer+bB2[view] [source] 2025-11-20 01:56:37
>>speckx+(OP)
It's just a bad language.

It's the only programming language other than C which actually needs a tutorial on how to use arrays of arrays. It's a part of the standard Perl doc, appropriately named "perllol": https://perldoc.perl.org/perllol

Most popular languages (Python, JS, Java...) as well as classics like LISP manage references transparently - the distinction between "array" and "reference to an array" is abstracted out.

In Perl, it isn't. It's a language with some archaic elements of manual memory management and parameter passing quirks. It's very clear that Larry Wall was not guided by programming language theory or math-inspired abstractions, but "whatever shit would be easiest to implement" (from https://perldoc.perl.org/perlsub#SYNOPSIS):

> ... any arguments passed in show up in the array @_. The array @_ is a local array, but its elements are aliases for the actual scalar parameters. In particular, if an element $_[0] is updated, the corresponding argument is updated

Theorists described call-by-value, call-by-reference, etc. But our man Larry came up with pass-via-a-local-array-but-its-elements-are-aliases-for-the-actual-scalar-parameters. I can see how one can quickly hack this together. But maybe it's time to retire this.

330. daotoa+jC2[view] [source] 2025-11-20 02:04:44
>>speckx+(OP)
As I have said before[1], I think the biggest thing slowed Perl adoption was the changing background of new developers. New folks just didn't have a background in shell, C, awk, and sed. This fact took Perl syntax from being amazingly intuitive and easy to adopt and turned it into obscure nonsense. As a newb what the heck are you going to think about constructs like the file test operators[2]?

[1] https://news.ycombinator.com/item?id=44726347#44752240 [2] https://perldoc.perl.org/functions/-X

◧◩◪◨⬒
340. __davi+vJ2[view] [source] [discussion] 2025-11-20 03:04:25
>>double+xm2
I love tcl. My absolute favorite thing about it is that `man tcl` [1] gives a dozen paragraphs that completely describe the language itself. Its simplicity always astounded me since it seems really simplistic but at some level it’s just as malleable as lisp. I wish it had caught on more (outside the hardware community which seems to have fully embraced it).

[1] https://www.tcl-lang.org/man/tcl9.0/TclCmd/Tcl.html

◧◩◪
345. slyall+FN2[view] [source] [discussion] 2025-11-20 03:42:32
>>citrin+VE1
A few people started using Ruby for command line tools[1] but the community was very focuses around rails. Also Ruby isn't usually part of the standard OS install. So Ruby stayed stuck in it's Rails niche.

[1] Some listed here: https://en.wikipedia.org/wiki/List_of_Ruby_software_and_tool... https://en.wikipedia.org/wiki/Category:Free_software_program...

◧◩◪◨⬒⬓
347. shagie+9T2[view] [source] [discussion] 2025-11-20 04:36:46
>>kstrau+6e2
They were inherited from even older languages and meant pretty much the same thing there.

https://en.wikipedia.org/wiki/AWK#Match_pattern_from_command...

    #!/bin/sh
    
    pattern="$1"
    shift
    awk '/'"$pattern"'/ { print FILENAME ":" $0 }' "$@"
The $ notation for a variable in bash and awk... and BASIC...

    RIGHTS imm & def
    RIGHT$ (sexpr, aexpr)
    ...
    PRINT RIGHT$ ("APPLESOFT" + "WARE", 8)
    SOFIWARE
One might make the claim that EWD498 was correct... https://www.cs.utexas.edu/~EWD/transcriptions/EWD04xx/EWD498...

> It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

https://www.perl.com/pub/2007/12/06/soto-11.html/

> Now, however it was initially intended, I think BASIC turned out to be one of the first major scripting languages, especially the extended version that DEC put onto its minicomputers called BASIC/PLUS, which happily included recursive functions with arguments. I started out as a BASIC programmer. Some people would say that I’m permanently damaged. Some people are undoubtedly right.

... but it wasn't without previous examples that Perl went the way that it did with sigils.

◧◩◪
358. anonno+D03[view] [source] [discussion] 2025-11-20 06:07:31
>>creer+SB1
> Here we used mod_perl all over the place and it was glorious. It did take understanding how to use it - well, yes - same as the rest of perl (or apache for that matters). But it was so well integrated! I still miss it.

See >>45989369

Most people, including small businesses, used shared hosting providers back then, and none of them supported mod_perl, while most of them eventually did support mod_php. That's why PHP came to completely dominate the market for self-hosted (or hostable) web applications, like phpBB, Drupal, and WP--writing those in anything other than PHP after mod_php became available (but before AWS) made no sense. PHP was at least as ubiquitously supported as Perl, and through mod_php (avoiding CGI's overhead), much faster.

◧◩◪◨⬒⬓⬔
360. maskli+L53[view] [source] [discussion] 2025-11-20 07:05:16
>>jeeyou+m03
I’m not talking as a user, I’m talking as a person who ported 350kLOCs of python from 2 to 3.

Django absolutely would have been ported: it was ported without six by Vinay Sajip (building on an earlier work of Martin von Löwis). In fact a limited shim layer was initially committed based on Vinay’s efforts: https://github.com/django/django/commit/5e6ded2e58597fa324c5...

The team ultimately decided to use and re-export six for the convenience of the ecosystem, not out of any sort of necessity.

◧◩◪◨⬒⬓⬔⧯
362. bonzin+a73[view] [source] [discussion] 2025-11-20 07:20:49
>>creer+Or2
Yes, I didn't say that sigils went away. But for example in Perl 6 lists are @ whether you declare or access them, instead of the sigil changing depending on what you want to get out of the expressions. It says it in one of the first apocalypses even that people "found it a bit weird": https://metacpan.org/release/AUTRIJUS/Perl6-Bible-0.30/view/...
◧◩
382. Qem+CF3[view] [source] [discussion] 2025-11-20 12:44:29
>>dzonga+wt2
> Ruby not being easily installed on windows back then stopped new blood as well.

Also the lack of something akin to Python's IDLE in the standard install, to decrease set-up attrition for beginners. E.g. see https://stackoverflow.com/questions/16042945/rubys-irb-with-...

◧◩◪◨
401. Enk1du+Ch4[view] [source] [discussion] 2025-11-20 16:24:32
>>cestit+rQ1
This combined with a cpanfile is how I rescued someone else's workshop from being an "Install these missing dependencies" session to being back on track in 3 minutes with "Here's this file, run 'cpanm --installdeps --notest .'"

https://metacpan.org/pod/cpanfile

◧◩◪◨⬒⬓⬔⧯▣
404. chucka+Cl4[view] [source] [discussion] 2025-11-20 16:42:52
>>creer+Fc2
Also to be fair, a modern Perl app doesn't even need to use `$|++` since the framework, even if it's raw Plack, will manage output flushing for you since you're no longer banging on raw stdout. I'd say Perl suffers from an even worse problem of legacy tutorials than PHP, but the size of PHP's userbase and thus sheer number of bad tutorials makes it worse there.

chromatic's https://modernperlbooks.com site is nearly unmaintained now, but still contains some good links to tutorials and whatnot on the obvious subject. Including a pretty recent retrospective: https://outspeaking.com/words-of-technology/why-perl-didnt-w...

424. anonno+cc9[view] [source] 2025-11-22 08:46:41
>>speckx+(OP)
The reddit comments on this are worth a read: https://old.reddit.com/r/programming/comments/1p1yjb4/what_k...
◧◩
427. kakwa_+3vb[view] [source] [discussion] 2025-11-23 09:48:25
>>autarc+ZJ
Perl was pretty much first in the wave of interpreted languages from the late 80ies and 90ies. It set the bar on what to expect from such ecosystems.

But being the first meant it got some oddities and the abstractions are not quite right imho.

A bit too Shell-esque, specially for arguments passing and the memory abstractions are a bit too leaky regarding memory management (reference management fills too C-esque for an interpreted language, and the whole $ % @ & dance is really confusing for an occasional and bad Perl dev like me). The "10 ways to do it" also hurts it. It lead to a lack of consistency & almost per developer coding coding styles. The meme was Perl is a "write only language".

But I would still be grateful of what it brought and how influential it was (I jock from time to time how Ruby is kind of the "true" Perl 6, it even has flip flops!).

In truth, these days, I feel the whole "interpreted languages" class is on the decline, at least on the server. There are a lot of really great native languages that have come up within the last few years, enabled in large part by LLVM. And this trend doesn't seem over yet.

Languages like Rust, Swift, Go, Zig or Odin are making the value proposition of interpreted languages (lower perf but faster iterations) less compelling by being convenient enough while retaining performance. In short, we can now "have the cake and eat it too".

But the millions of lines in production are also not going awywhere anytime soon. I bet even Perl will still be around somewhere (distro tooling, glue scripts, build infra, etc...) when I retire.

Anyway, thank you Perl, thank you Larry Wall, love your quotes.

https://en.wikiquote.org/wiki/Larry_Wall

[go to top]