Routine computer tasks and system programming require different tools, though I’m not entirely sure why.
Many people have thought about how inconsistent shells and system programming languages are and tried to unite them. Wouldn’t it be nice to use one language for everything? But attempts to bring system languages down to the shell, or to push shell programming up to large programs, have not been very successful.
I learned Perl in college so I wouldn’t have to learn shell programming. That’s what Perl was initially designed to be: an alternative to shell scripting. Larry Wall called Perl a “distillation of Unix culture.”
Perl is the most disliked programming language according to Stack Overflow. And yet I imagine many who complain about Perl gladly use the menagerie of quirky tools that Perl was created to unify. Bash is popular while Perl is unpopular, and yet the quirkiest parts of Perl are precisely those it shares with bash.
I expect much of the frustration with Perl comes from using it as a language for writing larger programs. Perl is very terse and expressive. These features are assets for one-liners and individual use. They are liabilities for large programs and team development.
Compared to a system programming language like Java, Perl is complex, inconsistent, and unsafe. But compared to shell scripting, Perl is simple, consistent, and safe!
Most of my PhD work was high-performance C and FORTRAN wrapped in Perl for the scripting and reporting part. 20 years later I’m at a new company and using Perl again for just the reasons you describe. I can bang out a short script and be done with the work quickly. The kids here keep making fun of me for my old-guy language.
perl’s expressiveness is both a feature and a bug :-). beginners are confused by it. experts are empowered by it. language popularity may predict the probability of finding someone to hire and thus is marginally useful. but popularity in no way quantifies utility. i’d have moved on to perl6/raku but i could never figure out what VM i was supposed to use. :-)
I like Python — that’s how I found your blog, btw — and use xonsh, which uses Python for scripting. Good stuff. https://xon.sh/index.html