(That said, I do still have the tabs of perldata, perlobj, perlmod, and perlop open because I want to learn it better.)
This random blog post gives something of the flavor.
https://lifecs.likai.org/2008/10/using-perl-like-awk-and-sed...
The equivalent Perl isn't that far off from the above.
perl -nE '/foo=([0-9]+)/ && say $1'
If you're jonesing for a sed replacement (it even has capture groups) try: https://github.com/chmln/sd
Worth being aware of:
Would you consider trying something other than Perl once it is no longer packaged for you? Because it is an x-language, bereft of life.
For a lot of us, we want to develop scripts (and skills) that are portable across different environments. There are limited hours in a workday, and I get the most value out of learning (and using) tools that I can find on the servers / build-machines / workstations that I have to use every day. Those machines run Ubuntu, Debian, Rocky, and RHEL.
Yes, it's a slow process to get new packages into mainstream distros. That's not a bad thing, because those packages have to be maintained for a very long time. Stability is a virtue here.
There are some ecosystems (I'm looking at you, Javascript) where anything older than a year might as well be abandonware. It's great that there are some fast-moving areas in our industry, and also great that there are slow-moving areas.
Don't make the mistake of assuming something is bad just because it's feature-complete. You might be surprised at how feature-rich something like Awk really is.
If your argument boils down to "Awk and Bash are ugly and outdated", I'd encourage you to think more flexibly about the tools you choose. There's nothing wrong with learning the basics of a widespread tool that you are guaranteed to find anywhere.
> if your argument boils down to "Awk and Bash are ugly and outdated"
Not at all. However, Awk was written almost 50 years ago. The awk book is good and the thing is installed most everywhere so if you're already invested in it and it does everything you want, keep using it of course. But it just might be possible to improve on a tool after half a century.
I simply shared new tools, that if you like awk, might really be up your ally. They might not be packaged with your favorite package manger anytime soon but you can grab them with cargo - if that's not portable enough so be it. No harm no foul.
If you find unknown syntax construct in Perl code, it is hard to identify what it is, but if you find unknown function in AWK, you can just google its name.
Also, AWK is mandated by POSIX, so one can assume it is installed, while Perl is optional.
Perldoc perlintro. Have you seen real life Perl outside of oneliners?
Example from that article
$ echo "foo\nbar\nbaz" | ruby -ne 'BEGIN { i = 1 }; puts "#{i} #{$_}"; i += 1'
output 1 foo
2 bar
3 bazsh, awk and sed are fine. They are easy, small, powerful tools that are easy to compile and understand.
Perl, python, nushell, etc. The options listed here are great if you're writing cute snippets on the terminal or hacking together some higher level automation.
These more elaborate tools, however, are terrible if you're trying to be lean in the build/bootstrap process and have a small set of auditable, easy-to-compile tools.
The graph on this page illustrate the bootstraping problem well: https://bootstrappable.org/projects/mes.html
These small 50+ years UNIX tools that have zero build dependencies are around for a reason: they are small and have zero build dependencies.