>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.
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to