Live data from Hacker News

Perl first commit: a “replacement” for Awk and sed

github.com

1–10 of 261 posts

Re: Perl first commit: a “replacement” for Awk and sed

#4
I used to kind of unfairly disparage perl, but now I regret never learning it. I've written a lot of scripts for munging text/files that outgrow bash, and when I rewrite in Python they get twice as long. Seems like perl would be a happy medium and let me keep using a lot of the nice bash shortcuts like `baskticks` for shell execution, etc

Re: Perl first commit: a “replacement” for Awk and sed

#5
One thing to keep in mind is that this is not actually the first version of perl, it's the first public version of perl. A version 0 did exist at the JPL previously but it's likely lost to the ages at this point.

EDIT: For the curious about the history, take a look at the perlhist documentation, https://perldoc.perl.org/perlhist it's got a lot of good info about the history of perl and it's releases.

Re: Perl first commit: a “replacement” for Awk and sed

#8
post #2

The funny thing is Perl is now arguably more obsolete than sed and awk.

That might be true culturally, but it's not true technically. Once you know a bit of Perl (including some command line switches like -e, -n, -a, -l, -p, and -i) you will be able to do just as easily everything you used to do in awk and sed, but with a more powerful foundation so you have the flexibility to go further.

Re: Perl first commit: a “replacement” for Awk and sed

#9

I used to kind of unfairly disparage perl, but now I regret never learning it. I've written a lot of scripts for munging text/files that outgrow bash, and when I rewrite in Python they get twice as long. Seems like perl would be a happy medium and let me keep using a lot of the nice bash shortcuts like `baskticks` for shell execution, etc

Yeah so many people shooting themselves in the foot by failing to take advantage of this powerful tool - as you say especially for stuff that you might have otherwise used an overly-complex bash script for.

Re: Perl first commit: a “replacement” for Awk and sed

#10
post #2

The funny thing is Perl is now arguably more obsolete than sed and awk.

My first thought when I saw this was that I'd like to see some stats on use of the three. I personally use sed and awk regularly and never perl, but I have no idea what is typical. I have a feeling that most people (amongst those who may have a use case) don't use any of them.
Post reply on HN