I'm still comfortable recommending people learn sed/awk but I don't think I'd recommend learning Perl* now. It sits in an awkward spot between the simplicity of GNU utils and the expressivity of a scripting language, but doesn't do either of those things better than the equivalent sed/Python etc.
FWIW I still write Bash scripts on a daily basis, too.
* that's no comment on Raku, which I consider a separate beast.
It does scripting and gluing scripts far better than python.
It's not even close.
I'm not even going to address sed, awk, bash and the like.
but otherwise a script is either just calling a lot of commands one after the other, for which a shell script is fine. or they do a lot of data mangling without needing many external applications or none even, in which case any other languages besides perl is just as fine.
This. I always feel like bash and pipes are always holding me back and resisting.
Python is just to verbose to exec/pipe/read/write.
The real issue is the it's really easy to shoot yourself in the foot with perl.
A lot of the tutorials online in my opinion are overbaked and written for people writing large OO projects using a lot of scaffolding. But the man pages were originally targeted at sed and awk users in your position.
Worth noting “sed” is “thirst” in Spanish, which has the potential to throw off the data, especially worldwide.
https://trends.google.com/trends/explore?date=all&geo=US&q=p...
All true.
But awk is also a programming language, not just a command line application or utility.
It has conditionals, loops, regexes, file handling, string handling, (limited) user-definable functions, hashes (associative arrays), reporting abilities and more.
In fact, the name of the original book about awk is The Awk Programming Language.
Great book. I read it after it was so enthusiastically endorsed here on HN. A lot of people said it was worth reading just to take in the excellent technical writing style of Brian Kernighan.
I would offer a strong second to that.
stats wise i am sure there are still a lot of perl users. it has its fans, and there is a lot of existing systems, but it is now a choice among many, and not usually the best choice.
Can you name some? I'm guessing Rexx is one of those you mean.
with the older ones i mean languages like lisp and smalltalk which didn't become available for free or even usable on PCs until the 90s
i am not saying that they are all replacing perl, but that perl was used in areas where they are better suited, and with their appearance perl is no longer needed in those areas, hence the usage space for perl shrunk a lot.