> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ken Yap
> Sent: Friday, 7 January 2000 16:55
> To: Sydney Linux Users Group
> Subject: Re: [SLUG] Re: addition using script file
>
>
> >On Fri, Jan 07, 2000 at 04:37:22PM +1100, Ken Yap wrote:
> >> #!/usr/bin/perl -w
> >>
> >> while (<>) {
> >> $total += (split)[1] if ($. >= 3 and $. <= 6);
> >> }
> >> print "$total\n";
> >
> >bah - the awk script would have run several times before perl could
> >even start up
>
> Yes, maybe all of 500 milliseconds faster. Lots of time saved for the
> weekend. :-)
>
> And when you find that you want to do something a bit harder
> to the data,
> you have to junk awk and use a real scripting language. I'm
> not anti-awk,
> I use it in one liners like summing up the bytes of files in
> a directory,
> but it only gets you so far.
Having implemented a compiler in AWK, and a full ecommerce systen in Perl,
there is only comment I would make about these two languages:
"Horses for courses"
Regards,
Craig Southeren
-------------------------------------------
Equivalence - Home of FireDoor, MibMaster & PhonePatch
For Open Source H.323 - see http://www.openh323.org
Email: [EMAIL PROTECTED]
Web: http://www.equival.com.au
Fax: +61 2 4368 1395 Voice: +61 2 4368 2118
-----------------------------------------------------
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text