From: "Nick Diel" <[EMAIL PROTECTED]>
> I am working on a project where machines will use a perl script to
> write to a table in a MySQL database.  I want a perl script to run
> everytime there is a new entry, but I don't know how to trigger the
> perl script when there is a new entry (the perl to be triggered will
> be sitting on the same box as the database).  I know how to do basic
> database stuff with DBI, but I am still a perl beginner.

I think you will have to ask in some MySQL related list whether MySQL 
is able to trigger some external process on INSERT. I don't think it 
will.

So you basicaly have two options. Either the script can be running 
all the time as a daemon and check for new entries once even N 
minutes or the script(s) that add the entries can trigger the script 
directly. How will they do this may depend on the operating system.
It might be easiest if the script to trigger is a CGI and they use 
LWP::Simple to call it.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to