Think C# / Java to learn about OOP
Scala to learn functional programming
Golang for concurrency and using the type system to handle exceptions.
Perl is very similar to Python so won’t teach you much.
I know functional programming from Haskell, OOP from C++ and for rest I use Python. These are the languages I would prefer for each paradigm but I also know Java and C.
I think that Perl is different from all the languages I listed and that's why I wanted to study it.
Here's what I mean: I'm talking to another developer. I say, "Read in a line of input. If it ends in a newline, remove the newline." I can talk like that to a developer.
But when I talk to a computer, it says, "Read in a line of input? From where? And put it where? If 'it' ends in a newline? If what ends in a newline?" You can't talk to a computer that way...
Except in Perl. In Perl, you say, "Read in a line of input. I didn't specify where, so read in from the standard place[1]. I didn't specify where to put it, either, so put it in the default variable[2]. Then call chomp, which if I don't specify, will operate on the default variable."
[1] The default input is the files specified as command-line arguments, in order.
[2] The default variable, $_, is used when you don't specify a different variable. $_ plays the linguistic role of "it" - it's what you're talking about when you don't specify what you're talking about.
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.