Hacker News new | ask | show | jobs
by tripa 3420 days ago
I like Perl a lot better than awk, buy I do agree with the general sentiment of using the language that makes for the clearest code for the task at hand, especially the smaller ones. Which makes me a frequent awk proponent.

So I'm surprised at the following part of your comment:

> There is no reason to use perl in situation when awk kicks its butt with clearer, shorter code free of distracting author and other line noise

In my experience, the shorter ask code tends to be the one with sigils.

1 comments

But in a lot of ways awk seems way more modern than Perl (Perl 5 at least). You actually have functions with parameters rather than having a weird @_ array that you need to shift values from. Honestly, if I didn't know otherwise, I'd think awk came after Perl.
Functions with parameters in a () is already in Perl 5. Search for subroutine signatures.

http://perldoc.perl.org/perlsub.html#Signatures