Hacker News new | ask | show | jobs
by xonix 1443 days ago
When at some point I decided to learn AWK better, I was surprised to find that it had some very Perl-ish features, like `print` is the same as `print $0` or `if(/abc/){}` as shorthand for `if($0 ~ /abc/){}`, etc. Later I learned that Perl was designed as an AWK-on-steroids by Larry Wall.

No doubt Perl is much more powerful than AWK. But from other side it’s astonishing that such succinct and clear language as AWK was turned into a monstrosity called Perl.

Therefore, for me when it goes to text processing/manipulation I prefer AWK much better than Perl. Cleaner syntax, better portability, absolute minimalism. Now, thanks to GoAWK [0] CSV-processing with AWK is a piece of cake too.

I personally see no reason nowadays for me to write any Perl code, but I’m totally fine to use the software written in it.

[0] https://news.ycombinator.com/item?id=31350550

1 comments

He did take some inspiration from AWK, but Perl wasn't meant to be just an AWK replacement. For me, in the time when it first came out it was really handy, as you had access to most of the C stdlib without having to write C. I had a job in the 90's writing software that was a protocol hub of sorts, and Perl was really nice for testing since I could use tcp and udp sockets, interact with serial ports, etc. There wasn't really anything comparable at the time.