What Killed Perl?
entropicthoughts.com
entropicthoughts.com
There are many languages still in use today that have all kinds of warts and ugliness, but they remain in use because they still have momentum and lots of legacy things built in them. So being ugly or old isn’t enough of a factor for people to abandon something in droves.
Once you need to rewrite everything, there’s no reason to stay with something you know since you need to fully retool anyway.
As a Perl programmer since v5 was released, the confusion around 6 completely destroyed almost everyone’s enthusiasm, and immediately caused all new projects to avoid Perl. It seemed like 5 had reached the end of the line, and 6 was nowhere to be found. Nobody wants to gamble so many hours of their lives, and the future of their business, on such an uncertain environment.
If Perl 6 had any visible movement within the first few years, it might have survived, but it was a good decade before they even admitted Perl 6 might take longer than expected, and then more time after that before they admitted it should have been a new language. 6 was interesting for language geeks, and they probably did some cool things, but you can’t run a large popular project like it’s a small research project. That completely destroyed all momentum in the community. Perl 5 development only resumed far too late, after the writing was already on the wall.
Both Bill Gates and Linus understand backwards compatibility as a sacrosanct principle. Python only just barely survived the jump from 2 to 3. JavaScript can only survive this because there’s no other option in a browser.
I really don't think this is true at all.
Python 2 to 3 took a really long time, it was a real struggle, lots of people stayed on 2 for a really long time.
But I really don't think Python was close to dying the same way Perl has/is. There was no risk of Python not "surviving" in my opinion.
There was always a clear way forward and people were actually moving. The mass migration of millions or billions of lines of code from 2 to 3 actually happened and has many high profile million+ line migrations, like Yelp or Dropbox.
There was never anything similar for Perl 5 to 6, totally different situation.
It absolutely was. What saved it was:
1. The data science / AI crowd that was gathering momentum any many only used Python 3.
2. No popular alternative. Perl got python as an alternative.
Python was also a good, simple language and had a good healthy culture. But it's nothing sort of a miracle that it survived that biblical software calamity.
3. six
`six` was instrumental in repairing the Python schism by giving people a way to incrementally move their 2.7 code to Python 3, and write code that was compatible in both. The six project didn't exist at first and the path to Python 3 was too painful without it. Six solved all that by smoothing over built-in libraries with different casing between versions, incompatible core libraries, the addition of unicode strings, print changing to a function, etc, etc. Perl 5 to Perl 6 (aka Raku) never got that.
Big players, like Django or SQLAlchemy, kept versions both for 2.x and 3.x for quite some time. This allowed for a smooth transition, when all of your dependencies finally had good versions for 3.x.
The difference between Python 2.x and Python 3.x was not dramatic. I would say it was mostly cosmetic up until 3.5 when async landed. Even with these small changes, the splitting of byte strings and character strings alone (an obvious move towards sanity) was plenty annoying for many projects.
Communities and ecosystems are fragile; sharp turns can easily break them.. Even careful maneuvering, like the Python 2 → 3 transition, put very visible strain on the community. A crazy jump that was Perl 6 was not survivable, even though Raku may be a fine language.
None of my projects needed to worry much about char encoding, and I'd used logging extensively starting under 2.6 or so.
So no, I don't think AI saved Python; it was fine before then.
I can easily imagine a scenario where Julia could have taken the data science crowd and Node.js could have taken everyone else. People like Python, I guess.
Granted, this is coming from a relative noob who read and followed a couple of "how to set up Python properly" articles and that's about it. But I pretty much decided to spend my time on JavaScript, despite its cumbersomeness for implementing simple utilities.
"Having no popular alternative" is not something that was close to not happening.
Python had a history of tooling/libraries that made it well ingrained into academia
I still to this day stumble upon code I have to use 2.7 on, thankfully things like pipx make it easy these days. but still,switching back and forth could be a pain.
But you're right, it wasn't like Perl 6. People moved to python and php mostly from perl. what were going to move to from python 2? Ruby?
I think another saving grace was, when considering Python 3, one's choice was between "easy-ish migration to best in class" and "difficult rewrite into second-best". Meanwhile with Perl 5/6 it was "two moderately hard migrations into metastasized shell-script has-been language" and "difficult rewrite into best-in-class with lots of upside".
I turned down one of those companies because I didn’t want to deal with that migration in 2021
It was methodical and deliberate, but slow.
But I think it really happened because developers wanted to move to 3. There was enough momentum and upside for moving to 3 that the Python core developers could keep the migration on track without having to drag people along from 2 -> 3 before they were ready. Making sure that the transition was optional for a long time helped tremendously.
I was quite happy working in Python 2 for a long time and only transitioned over to 3 for new projects or code that I thought would have a long lifetime. This was very much a reason why I moved to 3 instead of to another language.
At the same time, I'm not sure what language I would have switched to for the things I was using Python for... Perl was out as it had it's own disastrous migration. Ruby was an option, but never really hit the general-purpose scripting language mark for me.
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
I was always of the impression that people were very reluctant to move even though the benefits were clear and the movement not nearly as difficult as people claimed. But I still hear people complain about, for example, how you can't run CPython 2.x bytecode on a modern CPython runtime even though you can't run CPython 3.13 bytecode on a CPython 3.14 runtime, either and that hasn't slowed anyone down at all.
If anything might have killed python it was not python 3 per se but shipping a "beta" version of Py3 as 3.0
Python 3 only got usable really around 3.3 or maybe 3.4
> There are many languages still in use today that have all kinds of warts and ugliness, but they remain in use because they still have momentum and lots of legacy things built in them. So being ugly or old isn’t enough of a factor for people to abandon something in droves.
Nothing forced anyone to abandon Perl 5 code, and I suspect most Perl 5 wasn't abandoned for its own sake; it was a Cambrian explosion of new greenfield projects rising out of the ashes of Web 1.0 that brought Python and Ruby and PHP to the forefront. It's just that a lot of the Perl 5 code out there in the world was quick and dirty CGI scripts that died naturally after the dotcom crash and as the web became more sophisticated.
(There's stuff about the perl language, but that's probably secondary.)
PHP arrived and ate into it's web app use-cases. Modperl wasn't great for hosted environments, to say the least.
Python matured and started eating into it's systems use-cases and eventually the web use-cases as well. And was just so much easier to work with and learn.
Perl was left with no real niche where it really shined, except one-liners and making poetry I guess
Perl, Lisp, Haskell, Prolog etc.
I was there when Perl ruled the world, I used it myself to rule the world. The scene was always managers going to the C++/Java teams and asking them an estimate to a get a project done. They would often come back with timeline spanning 1 - 3 years.
Perl teams would get it done in like a week.
Needless to say most non-Perl programmers wanted Perl gone for this one reason alone. Too powerful, people who know how to use it make too much progress compared to everyone else. Smaller teams making larger progress shrinking the head counts, which top bosses didn't like.
Programming world is a sea of mediocrity, good things mostly don't make it here.
The real issue is not just that Perl6 wasn’t backwards compatible, it was that Perl6 basically did not exist for real for many, many years. People got tired of waiting, and the lack of backwards compatibility did not help.
Also Perl6 was just more weird on top of weird from a mainstream perspective. Making it even harder to justify.
Nowadays when everyone and their dog (vcpkg) have a package system, it’s easy to overlook how magical CPAN was. A solution to the weirdest problem, just a package away.
It was a magical time.
If they hadn't done Perl 6 the way they did, it'd still be around. Perl 5 was fine but the impending doom gradually let it be overcome.
Even as a die-hard mod_perl fan, I never even tried Perl 6. The language had gone from the most concise and efficient way to process text streams to an incredibly complex OOP language that for some reason had an experimental Haskell implementation, its own custom VM and multiple compilers.
JS 100% respects compatibility, they even avoided some methods because some popular libraries in the past used to extend the Prototype for arrays
I was there at OSCon when Larry announced Perl6, and that it would be "out by Christmas". And I was there the next year, when he was asked about that, and cheekily replied "well, we never specified _which_ Christmas."
The wider Perl community adopted that, and for years it was a running joke that Perl 6 would be "out by Christmas."
Of course, people outside the Perl community didn't get the joke. They just perceived it as the Perl community making promises about release dates and then missing them. That was some self-inflicted damage.
In fact, Perl even had the tools to break backwards compatibility baked in from the v5 days.
I agree that Perl 6 is why perl died, but I think the thing that really killed it is what you mentioned. It was a completely different language that spend over a decade with a release date of "soon".
Who wants to work on a language that isn't being worked on because the next thing is AND where from what you know of the next thing everything will be a complete rewrite.
for line in file:
If you were new to the field at that time, Python seemed like a no-brainer.I mention this on light of the article's claim that this has to do with "a new generation of programmers brought up on … I don’t know, Microsoft systems, Visual Basic and Java". No. The new languages that appeared were just so much much better.
The insane lead time of Perl 6 to even get to a point of backwards incompatibility was it for me.
I'd started on an early version of perl 4 and went through the 5 transition and was excited about 6. For what seemed like "Duke Nukem Forever" time, and finally my fickleness drew me to other languages and frameworks.
You run the risk of killing the new in the cradle, though, and often that scares people.
from __future__ import coolshit
that's the way you wanna rollFun fact: The amount of time it took Perl 6 to come out after being announced was actually longer than the amount of time it took Duke Nukem Forever to come out after being announced
In the timeframe we're talking here (late 1990s), that transition was Python1 to Python2! A couple Linux distributions were on Python 1.5.2 for a very, very long time. All y'all forget that what Guido, et al. did for the Python 2 to Python 3 transition was informed by the grief they hit in the Python 1 to Python 2 transition!
I would argue that really "What killed Perl" was that people started writing bigger scripts than one-liners. Perl has a well-deserved reputation for being a "Write Only(tm)" language. Python (and really just about every scripting language of the time) was simply better for containing complexity and easier for a newbie to understand.
I remember taking printouts of Perl and Python scripts for the same task to job interviews. The Perl one always had some surprise for the interviewer no matter how hard I tried to remove them. The Python one ... was simply straightforward.
Even build an entire web-based GUI for a product.
But eventually you realized that if you wanted to reuse the code, or have others work on it, the downsides of Python began to pale.
I learned Python from reading a pocket language reference that just described the syntax and standard library, because the language was simple and easy to understand and everything made sense.
Conversely, I was trying to debug a script someone else ran and came across a line that said '$|++'; it was impossible to search for on the web, and when I asked on IRC the only answer I got was 'man perldoc' which also did not answer my question in any reasonable way.
For anyone wondering: `$|` is an alias for `$OUTPUT_AUTOFLUSH`; it defaults to 0 (line-buffered) but any non-zero value means 'flush output immediately'. Thus '$|++' changes 0 to 1 (or 1 to 2, etc), which means that '$|++' means 'turn off output buffering'. No one could be bothered to say that; if you had questions about the language you clearly didn't RTFM well enough so that became the default/only answer I ever saw.
Meanwhile, the PHP community was often welcoming and helpful to newcomers, despite most of them being bad at programming and giving bad advice, and the Python community produced a language that was so often self-explanatory that new user questions were more about how Python did things or asking about how to implement things they didn't realize were in the standard library.
So yeah, lots of things contributed to Perl's decline, but the community being a bunch of elitist toxic dicks sure didn't help matters and it meant that as the set of people looking to learn how to do programming on Linux grew past the neckbeards looking for any metric to show that they were better than other people then Perl's growth potential was finite.
Perl had and still has truly AMAZING documentation (and far better in perl 5 than Perl 6 - where the documentation's search function is regularly broken for example). And out of this world bring-up tutorials. But if the bar is at "I want to be up to speed after reading a short booklet" - well, that's not gonna work. For me I have programmed in perl for decades and I still get the occasional deep plunge in a feature area that I never used before... And the various docs and books still come through.
On top of that, Perl 5 had an amazing community ready to help - but understandably annoyed with constantly re-quoting the AMAZING documentation. It could have gone either way, it just went the way it did: experts present and ready to answer. But there too - if you expect the community to constantly answer the most basic questions, well, Perl was not for you.
As a tradeoff perhaps, that expert community also spent a lot of effort on the AMAZING module library.
Perl 5's thorough documentation, plus splendid course book, plus all the books, plus CPAN, PLUS the expert help producing fantastic rabbit holes to learn more about your PROFESSIONAL MEDIUM. THAT was the reason for choosing perl.
If anything, newcomers don't go to the documentation because they are not aware that documentation can be THAT good. That was, still is, a marketing error.
Grab a snippet of Java or Python and you can google it pretty easily, grab some line noise from perl and you would first need something to translate it into idiomatic text - search engines would search for "OUTPUT_AUTOFLUSH" but would often discard things like "$|++"
I remember learning my use of perl from a red book - probably "Perl 5 by Example" - everything was in books back then, and you read them. Now you learn programming via searches and LLMs, so the languages that win going forward are going to be the ones optimized for that.
When I asked a question on the PERL Usenet group in the 90s, I used the word "newbie" to describe my skill level. I got an automated email explaining why I shouldn't use that word.
Your overall point notwithstanding, this was just bad advice. What you want is `man perlvar` (or equivalently `perldoc perlvar`) which documents this and other predefined variables:
HANDLE->autoflush( EXPR )
$OUTPUT_AUTOFLUSH
$| If set to nonzero, forces a flush right away and after every
write or print on the currently selected output channel.
Default is 0 (regardless of whether the channel is really
buffered by the system or not; $| tells you only whether you've
asked Perl explicitly to flush after each write). STDOUT will
typically be line buffered if output is to the terminal and
block buffered otherwise. Setting this variable is useful
primarily when you are outputting to a pipe or socket, such as
when you are running a Perl program under rsh and want to see
the output as it's happening. This has no effect on input
buffering. See "getc" in perlfunc for that. See "select" in
perlfunc on how to select the output channel. See also
IO::Handle.
Mnemonic: when you want your pipes to be piping hot
Also, `man perl` gives a great overview of the extensive number of Perl-related manpages. I think any person that starts from `man perl` will be able to answer a lot of their questions, but part of the problem was that around the millennium, people stopped reading man-pages, and started looking for information on the web. perl was one of those old-school tools that were documented extensively in man-pages, but past 1995 ~nobody bothered to read man-pages anymore.What's an example of a language that's as bad as Perl, that's used as widely as Perl was, that's still in use today?
Perl died because everyone who mattered knew it was a bad language, knew it had to undergo drastic changes, but that essentially meant implementing a new language.
Perl 6 was the symptom, not the cause.
---
Note: by "bad language", I mean bad for anything much beyond the kind of thing you might use awk for. It was bad not because of subjective aesthetic issues, but because it was difficult to maintain non-trivial code bases. Its "write only" reputation was well-deserved - the original author of a non-trivial Perl program might be able to maintain it, but once a team is involved, forget it.
The real issue was ugly code that was in the product when it was acquired--you can write 2000 line methods in any language if you are cursed enough. Believe me, if you do this, you will be cursed.
We dealt with the flexibility of the language by defining clear guidelines on what approaches were recommended and what misfeatures were banned.
I'd go so far as to argue that the expressiveness and flexibility of the language was an asset that helped us in our refactoring. For example, we built instrumentation that took advantage of Perl's unusual semantics for dynamic "local" variables to create flexible instrumentation that could have log levels enabled based on the call stack--if you turned on aggressive logging in function A, it would propagate to A's calls into functions B and C, while other calls to B and C would be logged at normal levels.
Yes, it's possible to do this sort of thing in other languages using a singleton that tracks logging context, but the dynamic scoping gave us the tools we needed to build something powerful with only a small amount of clear, commented code.
> The real issue was ugly code that was in the product when it was acquired
IME, this was the norm for Perl projects, not the exception. And you explain the reason for that:
> We dealt with the flexibility of the language by defining clear guidelines on what approaches were recommended and what misfeatures were banned.
Yes, it's true that a disciplined, mature, skilled team can write good code in any mainstream language. But in practice, there are far more teams that lack enough of those qualities, that using what I'm calling a bad language will contribute to them producing hard to maintain, buggy code.
If you're defining a subset of a language as being good, you're proving the point about the overall language not being good. This is why Perl failed - because its real-world use more often than not produced poor outcomes.
> Yes, it's possible to do this sort of thing in other languages using a singleton that tracks logging context
That doesn't sound like the right approach - it sounds like you really want the opposite of a singleton. In most languages, you'd just pass a different logger instance, either as an argument or in an object field.
PHP? I don't know how widely it's still used, but I'd guess it's more widely used than Perl. Also, PHP is not "as bad" as Perl. It's much, much, much worse. It's Perl without the charm.
I will always bang the drum for Java for doing this well. Making changes to a heavily used language is _hard_. Sure, the speed of progress can be slow, but Java has managed to introduce major improvements (and deprecations) without causing a schism. That deserves respect.
My team has recently ported 14 Ruby services along with over 50 separate Gem libraries from ruby2 to ruby3 where THEY CHANGED HOW FUNCTIONS INTERPRET ARGUMENTS! Older code run on newer runtimes _change behavior_ for the same code by treating splatted arguments differently, which was _very_ annoying to figure out and reason over for codebases that _heavily_ used '*' splatted arguments.
I feel like folks need to take page from Java's book and maintain backwards compatibility as a core tenet of their language. I've done perl4 -> perl5 -> raku, python2 -> python3, ruby2 -> ruby3, and rewriten a handful of c++, rust and node applications because everything in those landscapes seems to be in constant flux...
I just want to write software that will continue to work after it's been written, without having to use an older CVE-ridden language runtime every time. From personal experience, only java seems to 'get it.' (I'm sure there are others that do get it, but sadly I've had little opportunity to use them.)
Didn't they start breaking things between Java 8 and 9? Modules, Reflection Access, JavaEE, ... .
I think the backwards incompatibility was a minor issue compared to how long it took for Perl 6 to be released. It was eighteen years from the announcement to the first (just barely) usable release. And for a lot of that time, I was hearing tech leads say things like "we don't want to start this project in Perl 5 if Perl 6 is just around the corner."
At some point, they changed the narrative from "Perl 6 is the next version of Perl" to "Perl 6 is a sister language to Perl" - but they should have renamed it at that point instead of waiting another 5 years.
It's worth remembering that the Perl 6 project was started because Perl usage was stagnating. But the project was so badly managed that it killed off both Perl 5 and Perl 6 (now renamed Raku).
Rust does this with "editions". That's where they can make breaks to the language. 2021 can still call 2017 edition code.
Perl actually had this as well with Perl 5. You could specify the version of the perl file and work from there.
Why they didn't do that with 6 was entirely bizarre. They basically promised to throw out all of CPAN with the next perl version.
I second your perplexity on perl 6 vs CPAN. I still don't get it. It's still a problem.
Right, but there aren't many with the kind of ugliness associated with real-world Perl code.
1. It pulled away folks who would otherwise have spent time improving Perl 5 (either the core or via modules).
2. It discouraged significant changes to the Perl 5 language, since many people figured that it wasn't worth it with Perl 6 just around the corner.
3. It confused CTO/VP Eng types, some of whom thought that they shouldn't invest in Perl 5, since Perl 6 was coming soon. I've heard multiple people in the Perl community discuss hearing this directly from execs.
Of course, hindsight is 20/20 and all that.
Also, even if Perl 6 had never happened the way it did and instead we'd just had smaller evolutions of the language in major versions, I think usage would still have shrunk over time.
A lot of people just dislike Perl's weird syntax and behavior. Many of those people were in a position to teach undergrads, and they chose to use Python and Java.
And other languages have improved a lot or been created in the past 20+ years. Java has gotten way better, as has Python. JavaScript went from "terribly browser-only language" to "much less terrible run anywhere language" with a huge ecosystem. And Go came along and provided an aggressively mediocre but very usable strongly typed language with super-fast builds and easy deploys.
Edit: Also PHP was a huge factor in displacing Perl for the quick and dirty web app on hosted services. It was super easy to deploy and ran way faster than Perl without mod_perl. Using mod_perl generally wasn't possible on shared hosting, which was very common back in the days before everyone got their own VM.
All of those things would still have eaten some of Perl's lunch.
The 1980s/1990s was full of many different data formats in a time before XML/JSON, often by long dead companies. Many a tech person was in a situation where "Oh fuck, how do I get this data out of some obscure database from some dead company from Boston that only ran on SCO UNIX into SAP/Oracle/etc" only to see somebody else already done it and made a CPAN module.
But stories like that became less common as DBs converged into a few players.
Then used for huge GUI apps that run slow like a wet week, unreliably
The same thing is happening with Python.
Now, of course, that's a common and maybe even expected thing for a library to have: Python has Pypi, Javascript has NPM, etc.
There was a well-trodden path from writing a hacky one-off script to deal with a specific task, to realising "hey! this might be useful for others too!" and trying to make it a bit more generic, to checking in with your local Perl Mongers for advice, to turning it into a well-tested, well-documented CPAN module.
That was the route I followed as an early-career sysadmin in the dying days of the dotcom boom - it helped me take on much more of an "engineering" mindset, and was an important foundation for my later career.
I can't have written more than a few dozen lines of Perl in the last 15 years, but do I owe that community and culture a lot.
The point where I disagree is I think Perl 6/Raku played a significant role in Perl's decline. It really gave me the perception that they were rudderless and that Perl probably had no future.
Other than that, I absolutely loved Perl. I love the language. It's super expressive. I never took a liking to CPAN. And I wonder if it could make a comeback given better dependency management.
I think Perl with tooling similar to uv would cause me to switch back today.
I assume you disagree with the blog post, not with my comment, since this is exactly what my comment says too!
Perl remained (and remains!) eminently useful in its original domain of Unix system automation glue and ad-hoc text analysis. But it was denied a path to the future by PHP, and by the time PHP was itself replaced it was too late.
Finally everyone else (python in particular) sorta caught up to the "clever systems glue" feature set, and the world moved on entirely. Perl is mostly forgotten now except by those of us who lived it.
PERL tripped over it's own feet (too clever, line-noise, unmaintainable).
Java(TM) being "guaranteed to be business-like" sucked the serious use cases away.
PHP was easier to grok, had "editable man pages" (ie: comment forum attached to each built-in), and didn't have "slow CGI overhead" or "FastCGI complexity".
Python was waaaay easier to read/write/maintain, and was a serious alternative (except for trickier process-control integration, you couldn't just "$XYZ = `ls -al`" like you could in perl).
...and then "PERL6 will be gloriously filled with rainbows, butterflies, will be backwards incompatible, and will be released Any Day Now(tm)" sucked alll the oxygen out of a developer investing in perl.
By the time nodejs became another contender for server-side languages, there was no place for PERL as it's effectively become kindof a COBOL for unix systems. Don't touch it if you can avoid it, and it requires expensive, difficult-to-find specialists to maintain it if you need to.
I started programming in the late 90s using Perl as my first "real" language. When I first saw some Python code (2.3 if memory serves), I found it much easier to understand. Not necessarily easier to write, but diving into a Python codebase 6 months later was a lot easier than doing the same than with Perl. Purely subjective, but I was far from the only one, even if quite a few people at the time preferred Perl.
Later, when the Web really took off, running PHP 4 was much easier to get going than either Python or Perl, so a lot of us went with that.
And yeah afterwards JS with node.js in particular. The millions pumped into it by Google certainly helped.
There was also a time a bit later with Ruby getting really popular. Not just for new projects, I heard of some codebases migrating from Perl to Ruby, when the writing was on the wall for Perl 5.
Go, I think when it became popular not many people were still using Perl. Also not really something you would use to bang out a quick script with. Probably more of a competitor to Java.
As for me, back to Python as my bread and butter. Probably haven't touched Perl in 20 years at this point. Looks like gibberish to me now...
Maybe. I mean the whole point of 6 was to modernize perl.
Perl needed efforts like 6 to happen, but it needed them delivered in smaller chunks over the years rather than as a big decade long "And now 6 is here".
Java learned this lesson after Java 8 and 9 which took multi-year effort to deliver 1 or 2 big changes to the language and the JVM. Now Java has multiple efforts in flight which have trickled in over the years (tickling me as a dev). Every 6 month release is a little better which makes the multi-year efforts seem all that much more worth it when they land.
As much as I liked Perl back in the day, it did sometimes earn its reputation as a write-only language!
At my company they really locked in the project being dead if the original contributors left.
Perl propped up regex (JavaScript regex is based off of it), so I get the impression Perl practitioners tried to make all the code regex-y as possible as a cultural thing.
Created some interest in several people who talked to me about experimenting with it for a while afterwards.
See, that's one of the things lots of people who enjoy Perl and/or Ruby in the comments around in this thread don't quite grasp: some languages require programmers possessing a somewhat special state of mind to read and write productively, and some languages allow pretty much every mediocre programmer to read and write, and still produce a manageable program.
The other thing is the information density. In my experience, most people after graduating high school have experience with reading mainstream fiction and school textbooks, and those things you can half-skim/half-read and still get out most of the meaning. Then those people hit the college-/university-level textbooks and screech and crash because those books, you have to read them sentence by sentence; not everyone can get get used to it (or even realize they have to do that in the first place). And similar observations hold for programming languages: Perl and APL are just way too dense compared to Go and Python; if you're used to reading code line-by-line (skimming over half of them), then it's really bloody annoying to switch to reading sigil-by-sigil (as for writing, well, we all know that typing speed was never really a bottleneck for programmers).
This lack of flexibility means that it's impossible to experiment with replacements for built-ins, and the lack of generics out of the gate meant so many things were simply impossible (like useful iterators).
Compare this to Rust, where almost everything like this is just a trait. If you want to offer a map replacement, you just implement the Index and IndexMut traits.
Overall, I don't think Perl is the best language design. It has some interesting ideas. Go is _also_ not the best language design. Is Rust the _best_? No, but it's better than both Perl and Go, IMO.
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.
I wouldn't call making the right decision confused. It clarified and justified their desire not to use Perl. Only a confused CTO/VP Eng type would choose to use Perl in spite of all its entrenched disadvantages and much better more popular alternatives.
Before Perl, there was no scripting language that could do systems tasks except maybe shell and tcl, but that's shell is an extremely unpleasant programming experience and the performance is horrid, and tcl's string-based nature is just too weird.
Perl gives you something more like a real programming language and can do shell-like tasks and systems tasks very nicely. Compared to what came before, it is amazing.
But then Ruby and Python came along and checked the "real programming language" box even more firmly than Perl while retaining the shell/systems angle. Ruby and Python were better than Perl along exactly the same axis as the one on which Perl was better than Tcl and shell.
I like Perl and used it professionally for year and vaguely remember probably around 2010x relatively massive Python evangelism (lots of articles, conferences, lots of messages from Python adepts on forums e.t.c). One of talking points (no longer needed nowadays) was that Python is backed (sponsored) by Google so Python will be successful and you should not worry about it's future and also if you will choose Python you will be successful (as Google is).
[1] Some listed here: https://en.wikipedia.org/wiki/List_of_Ruby_software_and_tool... https://en.wikipedia.org/wiki/Category:Free_software_program...
For me, this is why python took off. People wanted that lucrative job or receive the reflected glory of a winner, so y'gotta learn python. The rest is just post-hoc justification for why you made that choice passed on as "this language is better because of blah..."
A lot of the justifications don't stack up against serious scrutiny, but are accepted as gospel.
Haven't seen anybody start a Ruby project in more than a decade. Whereas Perl still has held its fort i.e Automation/Glue work on Unix systems.
I think you're right.
(I say that as someone who still very much loves to program in Ruby.)
TCL had the ability dynamically load and call into .so’s which was really powerful. Those who knew, knew.
It's both awesome and weird.
Some people use it effectively to this day. Most either have no idea about it, or know about it but can't get into the mindset (like me).
It is a real general-purpose programming language, not a "scripting" language. Did you ever have a look at it?
I wonder if there was an earlier point of Perl's demise. Perl 5 came out with flexible object-oriented features, but it took years for packages like Moose to come out and make it nice and usable.
But the bad side was that by the time someone was clever enough to invent Moose, all sorts of other bespoke object systems had been invented and used in the meantime, and your CPAN dependencies used every single one of them.
TBH, prior to perl6, perl was such a horrid inconsistent mess, it reeked of shell.
By the time Perl 6 was around, Perl's lunch was already eaten by Python. Only a few table scraps left. Perl 6 would have had to be a better Perl 5 and a better Python 2 to win.
Python came with better batteries and better syntax. It allowed producing code you could read and understand a week later. Perl I found was a write-only language for me. I went back looking at my old Perl code and I couldn't decipher it without some effort.
And Python became popular not just because it was a better Perl, but it attracted folks who used Java and C++. CPU speeds were getting fast enough that you could actually do file and network IO at acceptable speeds without all the `public static void main(String[] args)` and `System.out.println(...)` boilerplate, but still had all the object oriented bits like inheritance and composition with which you could go crazy with if you wanted.
Don't sell perl 6 short. I am using perl 6 for significant projects now (after a career of perl 5) - and it's fundamentally different. I describe it as perl to the power of perl.
For me, expressiveness is fundamental. And perl 6 gives me that.
Perl 6 is simply suffering from python being everywhere. And perl 5 was always easy to lampoon as "line noise". It's a stupid quip, but it leaves a mark on new programmers. You don't even need to read the course and you can already have an opinion. Stupid kills? And then perl 6 doubled down on that anyway. Then I doubled down on that ALSO and I get to use (carefully chosen) unicode symbols in my line noise :-) So there.
I saw Larry Wall at one of the conferences. He talked a about Perl 6 how it was progressing and such (it was before it was renamed) and year, expressiveness what stuck out. It certainly has lots of nice features, too. But at least for me, I realized with Perl 5 I wasn't smart enough for it. I would be lured by the clever short expressions and then sometimes later look back and had no idea what I wrote.
Larry is a great person, btw. During lunch at the conference sat at his table and he was very approachable and warm. I don't remember what we talked about exactly just that it I liked how down to earth and nice he was.
Perl exploded because it was the easiest, richest ecosystem available to plug into CGI and the web.
PHP & Ruby & Python then collectively covered the same waterfront whether you wanted “easy” or “fun” or “simple”.
And I would propose that PHP attracting the developer cohort who wanted “easy” and Ruby/Rails attracting the developer cohort who wanted “fun” were each individually more damaging to the Perl ecosystem than Python.
I think the article's author is implicitly not considering that people who were around when Perl was popular, who were perfectly capable of "understanding" it, actively decided against it.
Just my opinion, but this says more about perl 6's insane development schedule than python's advantages.
Perl and Python were similarly powerful and useful languages, but I could learn and start producing useful code in Python after reading an hour long tutorial. Perl took an order of magnitude longer, and remained more awkward to use just due to the Weirdness. There was a momentum building in the early 2000s toward competitors like Python and Ruby that were seen as less crufty and more modern.
Perl's developers seemed to agree, since they cooked up their own competitor to Perl, an entirely different language confusingly called Perl 6. The coexistence of Perl 5 and 6 made the Python 3 transition look like a cakewalk -- at least it would have save for Perl 6's almost entire failure to exist for over a decade after its inception. It produced lots of constantly churning specs and blog posts about register based virtual machines with native support for continuations or whatever, but no implementation of a language that anyone felt comfortable using for any real development. Meanwhile people kept using the ossifying Perl 5 for existing applications, and gradually transitioning away as they were replaced.
Also PHP overtook it for the "just FTP a script to $5 shared hosting and make a webapp" use case.
It's just that Wall's vision was incompatible with general purpose languages used widely by a wide range of knowledge and skill amongst its users, and as unix/linux opened up to that wider range, better general purpose alternatives were chosen. Having to learn to be a poet to be a good coder was too high a barrier.
To me this just sounds, umm, pathologically eclectic.
Perl is most human-like programming language, which is what makes it great, but also what makes it unreliable for large scale programming.
This claim always seemed bizarre to me. What kind of drugs do you think a layman would think you were on if you showed them a typical Perl program and asserted how "human-like" it was? Even if you tried to follow-up and explain it: "No, no, see this bit means open whatever file stream is specified in the command line, as long as it starts with a letter between 'A' and 'F' that can be either upper or lower case, and is followed after any random characters by at least 3 digits in a row. Then this next character means.... See? It's just like I'm describing it to you!"
1. failing to have a coherent path to Perl 6
2. Ruby (on Rails) taking over the workhorse task of serving up dynamic content that Perl had owned before then
3. Python completely dominating the utilitarian scripting/programming world in nearly every niche
Why did this happen? I was a work-a-day developer working in Perl v5 when this transition occurred and from my perspective and recollection v6's meandering development cycle -- which didn't really address the issues of the broader Perl community was the primary choice. Perl 6 was developed in a way that didn't address the broad concerns of the Perl community, and expected people to make a wholesale switch to what was effectively an entirely new language anyways. It forced people to go out looking and what they found were either stronger solutions to specific domains (Ruby on Rails) or a nicer language than what was being proposed (Python).
Where Python really excelled at the time was that it looked and worked very much like the pseudocode that was going around at the time, and had an opinion about how you should write your code. Perl is wonderful to write in, but in many ways is too expressive and permissive and it resulted in an ungodly mess that could be hard to maintain. Perl 6 simply leaned into that problem rather than encouraging a cleaner approach.
I never liked Python much, but damn if I couldn't argue that I was much more productive with it than Perl in the end. Which was weird because when I was really hacking in Perl I could write code almost as fast as I could think giving a kind of illusion of productivity. But Python was easier to integrate into a coherent team development structure and actual productivity is more important than feels.
I miss working in Perl. But I knew it was really finally dead when I was giving tutorial classes to new bioinformaticists who were being given old Perl codebases to update and they were getting through school without learning the language.
Python was indeed the scripting replacement. I would say it won because of its philosophy on simplicity and explicitness. Perl v5 suffered heavily in complex projects because the language itself was too complex and often cryptic
PHP kicked Perl's butt in the shared web-hosting environment.
You could do amazing stuff with mod_perl, but it was not possible to run a shared host with mod_perl without exposing every customer to every other customer's code. You could still do cool stuff with vanilla CGIs. Perl was practically synonymous with CGI back in the day. Once you grew past what a simple CGI would handle, it suddenly got a lot harder and a lot more expensive.
Meanwhile, PHP had simple Perl-like syntax and ran nicely in shared hosting. Better yet, you didn't have to choose from one of the 400 different Perl templating systems. No need to choose between TemplateToolkit, HTML::Mason, or Embperl. You just used the standard, built in templating.
PHP won because it was worse, you didn't have the power or choice Perl provided, but it was more than good enough and it was cheaper to grow with.
On Perl vs Python: - Perl was weird and proud of it, it promised creative power and flexibility - Python promised regularity and clear rules
- Perl tried to make hard things easy - Python tried to make routine things routine
- Perl had weird primitives that let you build whatever magical OO nonsense you wanted. - Python supported writing glorified struct OO that was fashionable at the time
- Perl was difficult to integrate with C libraries - Pyton integrated much more easily with C libraries
That being said, I like Perl much more than Python. Using Perl still feels magical, even if some of the syntax is odd. Using Python feels like I have my shoes on the wrong feet.
But I think the main thing that made it long term non competitive were a series of bad design choices all the way back to perl 4 or even 1.
Namely:
- the need for sigils
- weird sigil rules where the 0 element of @x is $x[0] not @x[0]
- auto flattening, ex. (@a, @b), and hence the need for manual reference management, as in (\@a, [1,2,3])
- lack of a native object system, and widespread repurposing of hashrefs as objects, with awkward field syntax $x->{foo}
- awkward function argument syntax: my ($x, $y) = @_;
These things add up, and both JS and python showed that all those can be done much more smoothly.
Another thing that counted at the time, is that PHP came out with a slightly worse language, but a super beginner-friendly approach to html templating and request lifecycle: you can just mix php and html in the same file, and the entire runtime environment is nuked at each request. The result was that php replaced perl for an entire generation of web devs in the early 2000s.
- awkward function argument syntax: my ($x, $y) = @_;
then you might be interested to learn about feature 'signatures': use feature 'signatures';
use strict;
use warnings;
sub foobar ($foo, $bar = undef) {
# do something smart
}
# call it:
foobar(1);
foobar(1, 2);
Not sure when it was added, but when I write the usual glue code, I love to use it these days. - weird sigil rules where the 0 element of @x is $x[0] not @x[0]
'@' and '%' indicate containers, while '$' is a scalar (which containers can contain). So '$x[0]' is referring to a scalar within the '@x' container. If you operate on a container, like 'push @x, 2', it uses the container sigil.I guess "weird" triggered me a bit, heh. I know it's subjective.
Array x === @x
Int x[0] === $x[0]
- Perl's fascination with punctuation makes it hard to google for stuff, since search engines strip punctuation. In an era of RTFM and grep, maybe this is okay, but puts the language at a substantial disadvantage vs languages that use more prose than punctuation
- The distinction between scalar vs array context is subtle and feels somewhat pointless if you learned a language like C or JavaScript first. C has no overloads but manages to work fine, and other scripting languages like JS or Python let you branch on the runtime type of variables explicitly. Why bother with array context?
- Similarly, people got used to having named function arguments in their function signatures. Maybe in an era where most code was either compiled (and had named function args), or was stringly-typed and scripting like Bash, Perl feels like more of the same. But once we started getting decent scripting languages that had named function args, it became a real pain to repeat basic stuff like "assign parameter 1 to variable $name, assign parameter 2 to variable $age" in every function. I wish shells would bite the bullet and figure out a way to adopt them.
Overall, our industry is moving towards larger scale and complexity, and at larger scales, reading and maintaining code is more important than writing code. Perl's language design choices are all balanced for 1-10 unix wizard authors having fun writing small scale scripts. Compare it to Java, the Anti-Perl: today scripting languages like Python, JavaScript are getting closer to Java or ML with compile-time type checkers and sophisticated type systems. Few new or existing languages are getting similar to Perl.
I don't think Perl 6 had anything to do with it. I wrote a lot of Perl5 in college, and didn't particularly want to write any more Perl5, or adopt Perl6.
Even with those two options, you can't just write some code in a page and execute it without some sort of itermediate code.
Thats why php became so popular, perl coders could pick it up in a day ($ and all) and all you have to do is write .php files to a server - with the bonus that you have a rudimentary templating system built-in to php.
There really isn't much more to it than that.
It's wild that right up until Rails got popular, we were writing code that served billions of requests off of homebrewed MVC-ish PHP frankenframeworks.
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.
"Picking it up in one day" is not a criteria for professional deployements.
See https://news.ycombinator.com/item?id=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.
Mentally, I put it in the same bucket as legacy ASP, which is looooong dead.
AWK scripts don't have any kind of dependency management features, so they naturally lend themselves toward being freestanding and self-contained. Perl, on the other hand, has a massive package ecosystem with transitive dependencies and widely varied quality and design aesthetic, amplified by the baroque design of the language. AWK is as close as a language can be to immune to dependency hell.
When Perl was new, perhaps many people saw it as "a better AWK", but I suspect most of the newcomers to AWK today don't see it in relation to Perl at all.
I remember learning most of Awk from a long, single web page that appeared to come from one of the official authors.
There's a reason the Zen of Python includes this:
"There should be one-- and preferably only one --obvious way to do it."
It also came with batteries included, which really lowered the learning curve.
Perl was well known for being a pain to read months after you wrote it. Most Python code in those days was readable by people who did not even know Python.
When I started my job in 2010, I took a class at work on Perl. I had done some Perl years before and had grown sick of it, but I thought I was just doing it "wrong" so I thought the course would tell me how to code in Perl "properly".
Nope - I'd been doing it "right" all along. I just hated the language. At the end of the course, I told the instructor (a graybeard) that he should just use Python, and that one day I'd teach the Python course and he should attend. He scoffed at the notion: "Languages will come and go, but Perl will always prevail!"
I never did teach that course, but I bumped into him about 7 years later. He had completely (and willingly) abandoned Perl for Python, and was a big Python advocate.
I was in college 1999-2003, I did PHP in an internship, and then later did some Perl in one of my classes.
Perl (in my college class) was so incomprehensible that I decided that I would avoid it. I've never applied to a job that uses Perl, and never responded to a recruiter that was looking for a Perl engineer. I've never had to use it at work, and fortunately I've never worked with anyone who wanted to use it.
I think it's best to think of Perl as a transition technology.
PHP had replaced CGI as the easiest way to get code on a webserver, Python and Java were easier to read and understand, easier to structure large systems with, and generally easier to use. Ruby came along and MVC frameworks became the thing for complex web platforms.
Meanwhile Perl was sorta keeping up, the "Modern Perl" movement helped dispel myths about "write only" code, things like Moose, DBIC, Catalyst, Mojolicious, etc meant you could write pretty modern stuff with it. But the community was smaller, fractured by Perl 6 and dominated by some ahem divisive characters which made it intimidating for newcomers, and it just slowly died from there.
By the time Stack Overflow came along it was easy to see that other languages had vibrant communities surrounding them and for me it never really recovered.
IIRC, The Perl 6 development thing went on for a very long time and got nothing but bad press. That took the wind out of my sails.
I was a Perl programmer, and I looked down my nose at PHP. Silly me, then and now
Why did PHP, an objectively a worse language, win?
Rasmus Lerdorf said in a quote I can no longer find, it was modperl vs. modphp for Apache.
Modperl was, typically for Perl, very comprehensive and allowed access to all the Apache processing hooks
Modphp was, typically for PHP, just enough to speed up rendering so only allowed access to the barest minimal set of hooks
Modperl, so much better (I can hear myself say 30 years ago)
But at the time most websites, by count not by traffic, ran on shared hosts where the system administrator gave you access to software. If they installed mosdperl you would be able to intercept, read, and change traffic for all websites hosted on that machine
Modphp, not so.
So PHP was widely available to the pioneers in the day, people scratching together a little web hosting business and growing . Perl was not
Not enough on its own to kill Perl, but an important nail in its coffin
It was worth fighting with Perl's syntax because it was the best option for web programming (for random amateurs like myself). Web hosts often didn't have C compilers available so C wasn't an option. TCL was workable but not as prevalent as Perl on web hosts. Same with PHP3. Keep in mind this was an era where you were deploying on machines you didn't on which you didn't have admin access. Most of the time you didn't have shell access on machines you'd deploy on.
As Linux adoption on servers exploded so did the deployment of PHP. It was easy to deploy PHP web apps since they could be readily dropped in your htdocs or public_html directory and be handled by the server. Enabling other CGI outside cgi-bin directories was uncommon.
So by 2000 or so there was no reason to learn Perl to do web stuff easily. You could do it in PHP which was already a templating language. The younger version of me that wanted to do web CRUD stuff bought a PHP book instead of a Perl book. With Python 2's release at that same time if you wanted to do portable non-web stuff you had a much nicer language than Perl available as well.
Same for autovivification. Insane feature. Useful for some problems but causes many more.
Which is a shame, because perl5 semantics had some nice features too! But there’s only so much you can do with a structure whose foundation is so wacky.
In retrospect, probably 90% of my enthusiasm for python over perl was just "if you use python, you never have to think about variable sigils ever again." That and `string.split()`.
Perl originated from shell programming and inherited some of its patterns. If you ever looked at a bash script using arrays you will immediately recognize "@" to access the array as a whole and the switch to the "$" sigil to access a single element from that array. Perl was designed to make it easy for shell script writers to pick it up.
Real arguments were added as of perl 5.20, which was in 2014.
Comparably: today, in the Python world, people are praising tools like uv because now they "don't have to understand virtual environments". And continuously since the introduction of PEP 668 three years ago, people have been grumbling about the expectation to leave "externally managed environments" alone. But uv still uses virtual environments; and `venv` has been in the standard library since 2012, and the third-party `virtualenv` that it's based on has been available since 2007.
A year later I tried to use that script on another project, but had to make some changes; and couldn't make heads or tails of it. Shortly thereafter I had occasion to look at some Tcl/Tk I'd written at about the same time...and it made perfect sense to me.
Had I used Perl on a daily basis, rather than occasionally, I might have stuck with it. Instead I switched to Tcl/Tk, and never regretted it.
One day, around 2000 or so, the author/maintainer, a well-known guy in the Perl community, updated the package with an incompatible API. If you used that package, you had to update your code. There was no backward compatibility, nothing. To make things worse, the README stated that it would AGAIN change API in the future, but he didn't know yet what the change would be.
I considered this disastrous maintainer behavior, as I'm sure anyone reasonable would. It was clear I had to stop using this package, and anything else this guy could get his claws on. But there really wasn't a massive outcry that I could see, nobody calling him out for this crap.
That's when I knew I had to stop writing code in Perl. I tried Ruby but found it unstable at that time. Next project I used Python, and never looked back.
Perl can be very well written. I deeply regret not encountering Perl Best Practices when it came out.
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=HzTjPx4NIiMFor moderately advanced text processing with regular expressions, supposedly its strong point, it was far less elegant and concise than AWK at the low end and far less readable and less batteries-included than Python for more complex tasks involving some integration.
For dynamic web pages, another of the main uses of Perl, PHP was purposefully designed and (while not really good) practical and user-friendly, with plenty of other obviously more robust and serious options (Ruby, Java, later Python, etc.) for more enterprise projects.
But, Perl was immensely popular, particularly in the 1990s in its 4.x/5.x days. We used it because it was precisely more elegant, ergonomic and performant than awk :-)
Later on, Python gained more traction because it was more batteries-included, and PHP evolved from being a toy named "Personal Home Page".
Also, Perl's strength was text processing in a world where data was moving out of simple columnar text formats and into databases, xml, json, and other formats better represented by object models than lines of text.
For me, that's the answer to this question: Ruby had all the stuff I liked from Perl, and didn't have the stuff I didn't like. It's just that simple.
It is a great language for quick and dirty scripts, one liners... But no one wants to start a big project in Perl, and I think for good reasons. With only the "quick and dirty" use case remaining, people didn't want to invest into a language for that, it is throwaway, that's the point. So it was left to die slowly.
I don't think that Perl 6 took away the Perl community, I don't think the people on Perl 5 and the ones on Perl 6 were of same kind, the former just wanted to continue using their "Swiss Army Chainsaw", while the latter wanted to design an innovative language. It has created some confusion, but I believe it is minor.
If I want to point at one thing that killed Perl, I would go with PHP. Websites were a common use case for bigger Perl projects. Now that PHP does it better, what's the point of Perl for that application?
Perfect for people who find Bash too sharp and fragile and Python too tedious.
Python evolved, PHP had 1000 times more "how to get started" articles, Node happened. And LAMP became the default for noobs.
But I think the package management and culture killed it for me. People took pride is writing obnoxiously messy code. Package dependency hell. Gung ho borderline toxic RTFM culture.
In hindsight, glad they didn't respond - got a much nicer EDA startup job a month later working with Tcl/Tk (which I had already used for ~10 years at the time).
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.
This is evolution. Not death. It found what are its strengths that would make it relevant today and it made the leap of faith. That is remarkable.
No one need to switch to Perls 6 and Perl 5 can evolve incorporating incrementally stuff from Perl 6. Not every core team has the time, the $$$ or the devs to put forward long term plans of compatibility.
People always expect "someone" to do it.
What Perl 5 people could do, is improve its code base, clean it up and use sane software engineering practices to make code boring, modern and much more friendly for contributions.
You know, the anthropic side of software.
Perl 4 was a great upgrade to bash as a scripting language. Perl 5 added a bunch of complexity to remake Perl into a programming language. It failed.
Perl 4 was a great scripting language whereas Perl 5 was a terrible programing language. Perl 5 lost to the better (dynamic) programming languages and bash reclaimed the scripting title as Perl 4 was dead.
I came to Perl when Perl 4 was the latest.
I was using it as a frame work for distributed computing, moving data between machines.
I was on the point of throwing it all away for C++ when Perl5 came out.
I forget the details, but it made everything possible, and did not get in my way like Perl 4 did.
I think its just one of those things, they lost mindshare and people stopped making stuff in perl. Network effects made it snowball from there. How often do you see code examples written in perl? Almost never. I see people write blogs with code snippets in python, c, rust or even shell all the time. Never perl.
Momentum matters and perl lost it. I think of perl the same way i think of cobol or fortran.
That said, we re-wrote all of our monitoring scripts in....Bash.
Ugh.
Especially for the type of users were Perl had gained some ground in the past...data science, DNA related stuff, etc. Non programmers.
If you look at just about any other language and how you would pull data in and out of json yaml, manipulate individual elements, etc... the Perl is just hard to decipher if you don't have immediate recall of all the crazy syntax for dereferencing things.
More importantly, there's hardly a problem that can't be solved in a much better way through other means.
> Binary package managers that chase down dependencies on their own weren’t a thing until the early 2000s, I think?
UNIX package managers started to be made available during the 1990's.
Though that doesn't cover much of the 90s.
What I miss from then are the O'Reilly books about Perl. Peak O'Reilly. Every one a joy to read and packed full of goodness. Without being 1,000 pages long. Oh, and CPAN.
Perl 6 was only ever a distraction - I was already out of love with Perl by then and Ruby (and obviously Rails) came along at the right time for the next project.
(Side note, I know "slim" containers are all the rage these days but please please please please just put curl in your unix containers or provide a script that lets me check the container health. I don't want to spend more than 5 minutes setting this up or I'll just look for something else)
Python claimed to be simple - which fit well with the "line noise", erm... propaganda.
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...
I worked at a company that had a 50k bash/perl install script maintained by the 3 person QA team.
Dear lord that was a mess.
I fought cpan for two days trying to get anything to work.
Switched to java, had it done and in production in an afternoon.
Not a fan of Perl.
(Worked out well I suppose? Almost 1/4 century and still using Python)
https://www.tbray.org/ongoing/When/200x/2003/07/31/PerlAngst
I completely discount the basic syntax as an issue. Sure, it is an easy thing to complain about. But I've personally seen a number of people with no background master the basic syntax very quickly. In fact I was able to teach myself from the Camel book with absolutely zero background in the various languages that are supposed to help you. And during the dot com era, most of the people writing CGI scripts in Perl, similarly lacked a programming background.
The first issue was the fact that a lot of bad Perl got written. It was remarkably easy to pick up a bit of Perl, then write a bunch of code. This code was generally bad, useful, and full of security holes. (Thanks, Matt Wright.) Most people's exposure to Perl was to this kind of code, and it left a permanent bad impression.
The TIMTOWTDI (There Is More Than One Way To Do It) philosophy fed into a widespread cowboy philosophy. People took pride in their mastery of Perl, and demonstrated it by using obscure features. Like, say, C++, many subsets of Perl make for good languages. But if you try to use all of the features at once, the combination doesn't play well together.
That said, there was a significant group of people who grew and improved together. They learned best practices, wrote good CPAN modules, and elevated their game. But this group fell into a different trap. They learned the immense productivity of small teams. But organizations filled with small teams of senior programmers, don't have a way to mentor junior programmers. This cut off the pipeline of future developers. Losing that pipeline is an organizational threat. How do you find maintenance programmers down the line? Many organizations that had a lot of Perl, then put a lot of work into trying to move away from Perl. A significant number of Perl programmers saw the writing on the wall, and took the opportunity to move away from Perl themselves. This resulted in very few new companies being built around Perl.
(Incidentally the same "no pathway for junior programmers" problem is becoming a big issue for programming in general because of LLMs.)
For the next problem, we have to go to perl5-porters. The group that maintained the core of the language.
Let's start with a key individual. Tom Christensen. Brilliant, productive, and a technical genius. But also confrontational, unstable, and a toxic influence that shut down Perl development. This was a major reason why the Perl 5.6.1 release took over a year to get important bug fixes out. Tom also drove a number of people out of the Perl core.
Then there was an underlying tension between two major groups. The first were people who wanted to take Perl, and run with it. Adding all sorts of new and interesting features. The opposing group was those who cared about production, and wanted to be reaaally careful about breaking anything.
This lead in 2000 to a famous cup throwing incident by Jon Orwant. Larry's solution was to behind the scenes put a muzzle on Tom, and start the Perl 6 effort. That way people who wanted new features could go off and play in the new sandbox, while those who wanted to support existing Perl could stay in Perl 5.
Over time a lot of the good ideas in the new sandbox got ported back to Perl. See, for example, Moose. The spread of these technologies meant that there was a lot of progress within the Perl ecosystem. Unfortunately this came as the Perl ecosystem itself was shrinking. The language itself improved a lot. But the programming world in general didn't notice, and didn't care.
I should have also mentioned that I was tilly on Perlmonks. For a long time I was the top rated poster, on the dominant question and answer site for Perl questions.
Jim Weirich was a heavy perl user for a long time, and we were both involved in the Cincinnati perl mongers group. He found ruby and fell in love. He thought Ruby would be a good fit for me and we had a long conversation about why he preferred it to perl. It took me a few years, but I eventually took his advice. As usual, Jim was right, and I haven't written any perl since then.
tl;dr: for me, ruby killed perl.
Python was more opinionated, and better able to integrate with external libraries. A lot of the heavy lift in python is really invoking external code from elsewhere. You can solve “real” problems with readable code without the learning curve of C or Java.
I still have nightmares about the time we were trying to write the server part of a distributed filesystem (the precursor to Lustre) in Perl.
a bunch of other things (java, ruby, js) replaced cgi scripts and mod_perl as a web backend environment.
python became a "must know" to interview at google.
old perl was neglected and became unreadable.
perl itself became ugly to eyes used to modern languages.
the perl 6 mess and associated sentiment made it look worse.
it was time for it to go anyway.
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
It was a combination of things, the Perl 6 announcement was one of the smaller parts actually.
- TIMTOWDI lost against "batteries included", and it lost big: It's not so much that the simpleness of the Python language won over Perl, the real and absolutely major problem at that time was the success of CPAN, which "killed" Perl 5. Perl 5 would have needed ONE object system, ONE base exception class, ONE way to do function signatures. Instead at the time, it came bundled with a bunch of Perl 4 utilities which nobody dared unbundling, CGI and a handful math functions. Being able to pick is nice, but everybody else did pick, too, and so if you used any CPAN dependencies, you soon had 3 incompatible object systems, 4 type systems, 5 exception systems co-existing within your project. A problem Perl has to this day and the reason why my team tends to re-implement stuff instead of pulling in dependencies. Python's "batteries included" approach easily won out, because stuff worked with each other and you didn't burn then scarce RAM on having different implementations of the same thing.
- Perl started to lose at the low-cost hosters against PHP already pretty early. It was easier during a certain time period to have a halfway performant PHP installation than a performant Perl installation. Hosters usually only offered CGI for Perl, not mod_perl, while PHP usually was offered as FastCGI module or mod_php which supposedly was easier to install. No low cost hoster wanted to mess with mod_perl, because it always was a hassle to setup.
- Speaking of mod_perl, things in the web dev sector still stayed pretty stable as long as Apache 1 ruled. People had to use mod_perl, but then you had a pretty performant solution. Then Apache 2 came around but mod_perl 2 wasn't ready for a long time (honestly I don't know whether it ever became ready). The Perl community at that time appeared entirely unprepared for that. While Python users were accustomed to run standalone Python servers behind proxies, Perl always was relying mostly on mod_perl. But threading in Perl stagnated and ran against a wall, and Apache 2 preferred multi process multi threading modes versus the simpler prefork multiprocess model that Apache 1 and mod_perl 1 ran on. This was the time were you could basically feel the creaking and everything breaking apart: suddenly there was no clear path forward, with mod_perl2's stability issues and the general threading stability issues of Perl 5.
It took years for the community to recover from that and focus on things like the Python-inspired PSGI/Plack as a way forward.
So, how does Perl 6 fit into this? Yes, in the early 2000s we did think, it would be just around the corner and be a clear upgrade path and solve everything wrong with Perl 5. Nice fantasy at the time. But at the same time, people were busy with far more pressing immediate problems, like how to migrate away from mod_perl1. When Python's WSGI and soon after that, Ruby on Rails came, they pressed directly into the vacuum left open by the mod_perl 2/Apache 2 disaster and this is actually what sealed the deal, IMHO.
I am not aware of any way (back then) to run mod_perl, which was powerful enough to facilitate developing Apache modules directly in Perl, safely in the shared hosting environments that most people used in the 2000s. If you wanted Perl, your options were either classic CGI, with the overhead of script recompilation and a new perl process spawned for each individual HTTP request (even if initially handled by the same Apache process), or paying up for a dedicated server/VPS just so you could run mod_perl.
How the Perl community thought this was an acceptable state of affairs, especially given how big of a driver webdev had been of Perl uptake during the .com bubble, when Perl was affectionately called the "duct tape of the web," and how they just sat by and let PHP eat their lunch, I'll never understand. But the attitude of the Perl community then was this mix of old-school UNIX/USENET "RTFM" culture and a dubious sense of cockiness (instilled through catechisms and catchphrases, like JAPH), so they weren't going to bend-over backwards to attract and accommodate new blood, expecting Muhammad to come to the mountain.
When the team departed, Perl lost its development velocity and Python wasn't that far behind.
The language had many strange quirks and every question I posted about its particularities was greeted with responses along the lines of "Are you even trying? How do you not get it? Did you even read the docs?"
Well, yes, I did, and I still didn't understand, because I found them unclear.
I left the job and dropped the language and moved on to greener pastures without much regret. And it seemed like many, many people I spoke to had similar experiences with it.
I speak from some experience. Because I'm a 90s UNIX nerd, I quickly hacked up a a bunch of stuff in Perl maybe 6 years ago to solve some text processing tasks for a compliance audit. It worked well and got the job done within the time constraints. I actually got some kudos for getting our team out of a jam and doing grungy work people weren't keen to do. My teammates though, they lost no opportunity to dunk on the fact that it was done in Perl, and questioned my decision at every opportunity. I ended up rewriting the whole thing in Python for our next audit.
If you know Python, just switch to xonsh (https://xon.sh/). I've been using it as my primary shell since 2018.
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...
In the early aughts, Google SRE recruiting had such a strong, selective focus on A-player sysadmins with Perl expertise that it drained the market of top talent. Within google these people began to adopt, and eventually create and evangelize newer, Googlier programming languages.
In other words, Perl expertise was the skills filter, and Perl itself a technological ancestor of certain modern languages like Go.
Not the language, but the easiest setup ever.
the ever infusion of new blood is what made Javascript & Python to be in top 3 languages today. Even though things like Ruby were easier for some. Ruby not being easily installed on windows back then stopped new blood as well.
for language designers / framework designers -- make your stuff easy for beginners then it easily grows.
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-...
Would Python have been able to compete, in a world where Perl could be readily comprehended by LLMs?
So, maybe what killed Perl was lack of VS Code forks and lack of being agentic.
Even if I disagree with our AI code assistant's usefulness - it often just suggests code based on "someone else in a different file used this statement after that last API call" that is totally irrelevant to my current needs - I can usually assess AI-generated code (C++ / python) relatively quickly and determine if it's what I want or not. It generally nails the "you just created this variable and now want to print it to the log" part pretty well.
Debugging AI-generated perl?? It would be like trying to follow "obfuscated C contest" entries all day, every day. No thanks!
(map { $~ =~ s/.*/$&/r } split /\s/, $^W x $/ ) ~~ tr/a-z/x/r x $!
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.
One of the biggest fumbles in the history of computing. (With hindsight ofcourse..)
Perl stems from a time where COBOL, FORTRAN, and SQL made sense and it was already mind bending for those accustomed to those old languages.
Modern minds can't comprehend Perl.
Python3 almost killed Python.
It’s a tale as old as time.
I found myself defending it more and more online against the folks who were nay sayers - those who complained about its syntax and it's quirks - but that wasn't a problem for unixers who used sed/awk/vim and all the other arcane tools. Perl wawa means to and end and it was the best tool to reach for (the glorious Swiss army knife).
I guess there was an infection period - the brain drain to python and Ruby meant it was harder to find decent quality libs on CPAN anymore as folks would only do things in python. And Yea, while CPAN is still rich, it's not the first hit on Google anymore.
Today, the map-sort-map Schwarzian transform is still the easiest to do in perl than any other language and it helps me whip up the throwaway scripts quick. Wouldn't change the language - I really love it!
[1] https://news.ycombinator.com/item?id=44726347#44752240 [2] https://perldoc.perl.org/functions/-X
You can call it dead. That's fine. Keep it unpopular. Popularity kills. Popularity leads to a language becoming dozens of different incompatible things. Perl is quietly amazing. I write once and run anywhere, anytime. Other languages can only dream of this.
[edit: also, even his own graph of "releasers" shows that if current trends continue, there will be essentially 0 "releasers" in 10 years]
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