D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

RE: [LUG] apache perl cgi question



Title: RE: [LUG] apache perl cgi question

>Given that the page is not *that* dynamic, I think I will re-write as
>shell script+awk and put it in /etc/cron.hourly to regenerate a static
>version of page.

Pity.  Generally speaking a Perl solution is more efficient and flexible than shell script+awk.  It really is worth persevering with Perl.  Trouble with Perl is that you get to realise just how inefficient shell scripts can be.

When considering awk, remember that you can pipe external programs (like sort) within an awk program, just like you can in Perl.  There should be no need to use the 'head' program.  It is sometimes possible to produce an awk program which is faster than its perl equivalent - it is the use of the shell and multiple child processes that slows things up.

Clive


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Lynx friendly