Helpful Hints - External Program
Benjamin M. Hill (Benjamin.M.Hill@dartmouth.edu)
08 Oct 97 01:09:51 EDT
I'm writing a really bizarre little program, and unfortunately, just don't have
the experience that I am starting to think I might need for this one. Any
pointers as to where I could look for info on it would be greatly appreciated.
Right now, a perl script gets info off of one sight on the web, parses it (no
where near as elegantly as it should be, but it works) and posts the new info
to a sight. Lots of these perl scipts are happening.
Now I want to add a database, local to where the script is being run off of.
The database takes a while to make. It statistically samples a WHOLE lot of
data, and then when you ask it specific questions, it throws back an anwser as
a string.
I've got the database working fine as a stand-alone program with a menu
interface. (1 to compile data, 2 to submit query, 3 to quit, etc)
So, here is the catch. The part that I'm unsure on.
I want to be able to start the database program up. Leave it running. And all
the little perl scripts can query the database, and get back their anwsers. It
seems like it has to be that way, because each perl script can't compile the
database as the script is called, there would be millions of coppies of the
database running around, swamping the machine.
With pipes, and open2, it can't be that bad (I'm hoping), but the tutorial in
the perl ref. sight didn't quite clarify things enough to do my own. Anyone
have any ideas on where I should go from here?
Thanks!
-Ben