However, for landing a job or doing more modern stuff like AI or web, I'd probably recommend
Python
as a first language, unless there is a specific reason to learn perlIt's mostly for personal reasons regarding design of PLs and to be able to learn a new way to think about programming.
In a vacuum I wouldn't recommend Perl over first learning the most common languages and technologies of today. I'd gain some familiarity with Python first at a minimum. But it does have some interesting niche advantages you might want to look into more down the road.
Perl 5 has been on the same major version for 30 years now [1], and hence has had a truly enormous amount of training data for LLMs to glomp onto. Since Perl is also primarily thought of as a "scripting-plus" language, something to reach for when Bash isn't cutting the mustard but a 'real program' feels too heavyweight, a lot of its use cases are very much in the LLM one-shot sweet spot. [1]
Perl 5 also has the unique advantage of being installed system-wide by default on more Unix machines than you might expect. It's sitting there quietly on Debian for you right now [2]. It's even the scripting-plus language of choice for OpenBSD!
You would think being "the same" for 30 years would also mean Perl almost accidentally performs really well on modern machines, which have a few orders of magnitude more resources to throw around. I haven't really found this to be that noticeable, though, and if I actually cared about performance in those domains I'd probably stick to the smallest tools I could work with first. Then again, a vanilla Perl 5 program might be even more cross-platform than a vanilla shell script is; shells come and go, but Perl 5 is forever, apparently.
[1]: https://hiandrewquinn.github.io/til-site/posts/llms-make-per...
[2]: https://hiandrewquinn.github.io/til-site/posts/what-programm...
I think it's fascinating how well it integrates in a Unix system and I find it very nice how concise it can get.
dapperdrake•6h ago
Perl went through a few backwards-incompatible changes and Raku (née Perl 6) and has eroded its library base and user base.
Kind if like the transition from Python 2 to Python 3 stranded part of the ecosystem.
The backwards compatible systems like Linux user space ABI, Java (ruffled feathers with Java 9), TeX/LaTeX and Win32 will stick around the longest due to accreting libraries. Golang is on its way there. Python 3 may have enough important libraries now to also stick with them. If Zig does their job right, then they also have chances.
For Java look at NTS from Java 1.2 days in 2001, where apparently even the old jar files still load on new JVMs: https://news.ycombinator.com/item?id=40753417