| I've started learning (in 2025!) and using Perl lately as shell++ It's extremely stable, installed almost everywhere, and has much fewer insane idosyncrasies than shell. I can write some Perl and confidently hand it to a colleague where it will almost certainly work on their machine. It's a shame it's so dead, for a scripting language there's nothing else that ticks the same boxes. I would never write systems software with it, of course |
Perl is straight up better. You need to remember one word: pie - for it's command line options, and now you can do:
First of all, it woks the same way across platforms.Second, you get all sorts of goodies: named capture groups, lookahead and lookbehind matching, unicode, you can write multiline regexes using extended syntax if you do something complicated.
And finally, if your shell script needs some logic: functions, ifs, or loops, Perl is straight up better than Bash. Some of you will say "I'll do it in Python", and I agree. But if your script is mostly calling other tools like git, find, make, etc, then Perl like Bash can just call them in backticks instead of wrapping things into arrays and strings. It just reads better.
BTW Ruby can do it, too, so it's another good option.