gawk into an array question
Kevin D. Clark
kevin_d_clark-Wuw85uim5zDR7s880joybQ at public.gmane.org
Tue Jan 27 17:39:47 EST 2009
Doug writes:
> The similarities are not an accident. I don't know the exact history,
> but Perl was meant to augment many of the uses of awk and a few other
> command line utilities. Programming languages that have arisen after
> Perl borrow some of the motifs and not others. Perl is great as a
> command-line glue, php as a web glue.
This whole thread causes me to smile, because I happen to remember the
source of this famous famous lwall quote:
Hey, I had to let awk be better at *something*... :-)
-- Larry Wall
...which was here:
http://groups.google.com/group/comp.lang.perl/msg/af646f4ae85fcbe4?pli=1
I remember reading this quote in netnews. Anyways, the whole point of
the quote was that sometimes awk is better than Perl....in particular,
for dealing with columnar data.
I am a very enthusiastic Perl programmer, and I recommend the language
highly, but I do admit that I frequently write small awk programs when
I have to deal with columnar data. By "small" I mean "probably less
than 80 characters" -- beyond that, the Swiss Army Chainsaw comes out.
Yes, it is no accident that Perl seems very familiar to people like me
who started out writing C and shell/awk/sed scripts -- Perl borrowed
heavily from these things.
Since the original poster is interested in Perl, please let me give
three pieces of advice:
1: use "use strict;"
2: use "use warnings;"
3: always strive to make your code clear.
Kind regards,
--kevin
--
GnuPG ID: B280F24E Meet me by the knuckles
alumni.unh.edu!kdc of the skinny-bone tree.
http://kdc-blog.blogspot.com/ -- Tom Waits
More information about the Discuss
mailing list