The Guru
Bob Stockler
bob at trebor.iglou.com
Mon May 26 06:35:53 PDT 2008
Mark Luljak wrote (on Sun, May 25, 2008 at 10:20:05PM -0400):
| You'll never BELIEVE what Scott Walker said here...:
| > bit of time tearing out some of the articles to save. Maybe someday
| > I'll finally master awk but by then it will have been totally superceded
| > by perl....did I get that right?
|
| Perl encompasses so much...including grep, awk, and sed, plus a few shell
| syntaxes, and a lot of C syntax, with a dash of FORTRAN.
|
| Technically speaking, as a superset, it supercedes awk already. However,
| as Bob Stockler can probably provide benchmarks, certain versions of awk
| may be better in terms of raw performance speeds for pure awk-capable
| applications. So it's hard to call awk obsolete if you only need the
| functionality of awk without the fat.
Using my "datecalc" program as an example of the above:
[trebor] ~bob: time datecalc 12/31/9999
2918871
real 0m0.02s
user 0m0.01s
sys 0m0.01s
[trebor] ~bob: time datecalc.pl 12/31/9999
2918871
real 0m0.12s
user 0m0.10s
sys 0m0.01s
[trebor] ~bob: time datecalc.ksh 12/31/9999
2918871
real 0m0.28s
user 0m0.26s
sys 0m0.01s
My "datecalc" program calculates the number of days between any
two dates, one of them being today's date if only one argument
is given. It was originally written in shell, then in AWK (and
I use the MAWK flavor of that language because it is the fastest
one of them). Finally, so it could be used on Windows, I wrote
a Perl version. Not being a Perl programmer, I used Larrry Wall's
"a2p" program as a start to doing the Perl version, so it uses the
same logic as the others.
Bob
--
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor
More information about the Filepro-list
mailing list