What Killed Perl?
Postedabout 2 months agoActiveabout 2 months ago
entropicthoughts.comTechstoryHigh profile
calmmixed
Debate
70/100
PerlProgramming LanguagesLegacy Code
Key topics
Perl
Programming Languages
Legacy Code
The decline of Perl is discussed, with various commenters sharing their experiences and opinions on what led to its downfall, including the rise of alternative languages like Python and Ruby.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
4h
Peak period
80
6-12h
Avg / period
22.9
Comment distribution160 data points
Loading chart...
Based on 160 loaded comments
Key moments
- 01Story posted
Nov 19, 2025 at 5:25 AM EST
about 2 months ago
Step 01 - 02First comment
Nov 19, 2025 at 9:42 AM EST
4h after posting
Step 02 - 03Peak activity
80 comments in 6-12h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 23, 2025 at 4:48 AM EST
about 2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45977900Type: storyLast synced: 11/22/2025, 1:19:10 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
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.
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.
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
One or two calls into a library with a simple C interface isn’t that bad with Inline. You just use Inline to handle the Perl to C to Perl part, and actually do the interfacing in the inline C. It’s a lot more mess if you’re doing complex things and bringing complex data structures back to Perl, or having Perl make a lot of intermediate decisions and doing a lot of round trips. So if you use Perl to get the data ready to pass in, pass it in, do all the work in C that you need the library for, then pass the results back to Perl once it’s not terrible.
I’ve tried not to get into XS, so I couldn’t really compare.
Using Inline::C with your own C code in places where Perl is too much overhead is certainly easier than wrapping a complex existing library with a lot of interactions across the boundary.
FFI::Platypus or something like it really is the way of the future though for existing C calling convention libraries in other languages.
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.
People who don't know Python will have a harder time reading modern Python, though.
> 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.
It's hard to remember really, but automatic downloads would have been considered quite a misfeature by lots of user sites, in an era of intermittent, metered internet connections.
As I recall, rpm could list dependencies but not automatically fetch them. Full apt-style recursive downloads weren't a thing until yum from Yellowdog (a PowerMac-specific clone of RedHat) and urpmi from Mandrake, both of which arrived in late 1999 or early 2000-ish.
RedHat eventually started using yum as well, but not until around 2002.
Certainly, in the late 90s, apt was king. Debian was struggling badly with their internal processes at the time, though, so they didn't benefit as much as they otherwise might have.
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.
I'd probably have an easier time getting back into REXX that I last used in 1992 or something..
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...
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.
Yes, that's probably what I was remembering. Thanks for the exposition.
I never understood why Perl has all these crazy features. It feels like someone going "hah it would be funny if it worked like this..." but actually really implementing it.
People always said "it's because Larry Wall is a linguist!" as if it explains anything!
You always go from "this is neat" to "...but why" quickly with perl.
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.
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.
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.
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 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.
https://metacpan.org/pod/cpanfile
Carton (manage and bundle your perl modules based on lock files) and Pinto (easily run your own private CPAN) provided the icing on the cake that made things really powerful.
I miss working in Perl, but the job market has pulled me in other directions.
I assume you disagree with the blog post, not with my comment, since this is exactly what my comment says too!
Now, of course, that's a common and maybe even expected thing for a library to have: Python has Pypi, Javascript has NPM, etc.
I would pick TCL over Python any day.
[1] https://www.tcl-lang.org/man/tcl9.0/TclCmd/Tcl.html
Ashok's book is an excellent source of information too.
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 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.
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.
As much as I liked Perl back in the day, it did sometimes earn its reputation as a write-only language!
My main source of support back when I did much Perl (late 90s, early 00s) was usenet, and while some groups were very snubby and elitist others were very helpful and encouraging for a young budding programmer.
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.
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.
To wit, I would argue that Go didn't go far enough in restricting the user and certainly did not pick the right features to include. I don't think it's clear at all that had go shipped with sum types—enabling better error handling—and iterators, more built in generic data structures, and higher level abstractions around its concurrency, but no generics at all, that we wouldn't end up with a far better language. A more restricted one, with even less room for anything custom, but a better one.
Many of us see that as an important feature, and a smaller set of people aren't too happy with the generics introduction for example. Or the recent iterators stuff they have added.
It makes codebases touched by a lot of people an absolute breeze to understand. There's no clever generic data structure/soup of traits/clever conditional types I have to understand from scratch. Everything is the same old boring maps and slices and for loops, nested sometimes. And functions mostly always return 2 values. There is no map/filter/anything. The name of function usually betrays the types. "getUserPreferencesBatch" is most likely a `func(userIDs []UserID) map[UserID]Preferences, error`. There's <1% chance it is anything else. People also tend to avoid relatively complicated datastructures like trees unless they are really really necessary. So you get boring, completely predictable, 70% optimal code.
Even when discussing implementation, people think in simple terms which leads to really simple implementations in the end across all team members. It basically makes drumming KISS into everyone really easy.
Now some people go all clean code or make functional wrappers and such, and that destroys all that's good in go.
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.
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.
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
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
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!
For 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".
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.
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.
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).
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).
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.
[1] Some listed here: https://en.wikipedia.org/wiki/List_of_Ruby_software_and_tool... https://en.wikipedia.org/wiki/Category:Free_software_program...
I think you're right.
(I say that as someone who still very much loves to program in Ruby.)
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.
Perfect for people who find Bash too sharp and fragile and Python too tedious.
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.
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.
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.
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.
Original was really rough because the core team had gone in the wrong direction on migration, and the Python io module was hell as well.
By 3.3-3.4 it was relatively smooth sailing but that took a lot of work from the community and core team both (reminder that Python 2.7 was released after 3.1, backporting a number of features to make compatibility easier, and old features were reintroduced as late as 3.5).
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.
None of my projects needed to worry much about char encoding, and I'd used logging extensively starting under 2.6 or so.
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.
Python 2 had both, it was a rename, not a split. unicode -> str, and str -> bytes. The "u" string prefix was also removed, which made migration of string-heavy code more of a pain than it needed to be, until it was added back in in 3.3
So no, I don't think AI saved Python; it was fine before then.
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".
Perl can be very well written. I deeply regret not encountering Perl Best Practices when it came out.
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.
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/
Python evolved, PHP had 1000 times more "how to get started" articles, Node happened. And LAMP became the default for noobs.
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.
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.
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:
If you've never seen it it's worth a watch: https://www.youtube.com/watch?v=HzTjPx4NIiMIt 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.
That said, we re-wrote all of our monitoring scripts in....Bash.
Ugh.
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.
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...
271 more comments available on Hacker News