perl script design question

Nate catenate at yahoo.com
Sun Sep 26 19:14:33 CDT 1999


On the Jax.PM jacksonville-pm-list;
Nate <catenate at yahoo.com> wrote -


JaxPM gurus,

Here's a question about the design of a perl script that I'd like some
feedback on.

Long story short: a web based survey saves its parameters (appends)
into a flat file. Each query appends about 60 lines into the file.

I'm now generating the script to parse the results and give a report on
a web page for the administrator of this survey. My concern is for the
performance of this design - parsing each line in the file (pseudocode:
if key matched, then foreach loop to get the value for that key)
instead of a DBM or other database. I only forsee having 50-200 people
actually complete this survey, so is the flat file good enough?

I'm certain that a full-fledged relational database isn't needed, but I
know how much faster DBM files are than flat files. The only thing is
the keys would be duplicated each time a new query was submitted,
overwriting the old keys and values.

Could/should I just parse the query as it came in from the browser, and
increment some values in the flat file to register the values that they
selected? This might not be too good if we get lots of hits at one time
(like lunch or first thing in the AM).

What are your thoughts? I know my sig says I'm a perl nut, and it's
true, I'm just not too experienced a perl nut, yet. I'm actually amazed
at how little I really know about perl, and how I can still produce
very functional results with it. I just want to maximize the script ;)

Of course I'm happy to give more details if I left anything out.


=====
nate    catenate at yahoo.com
[infosec|linux|perl] nut
my infosec favorites -> www.geocities.com/catenate/
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com


The Jacksonville Perl Monger's Group is operated by -
Bill -Sneex- Jones ( sneex at usa.net ),
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list