develooper Front page | perl.beginners | Postings from March 2002

processing multiple records simultaneously

Vani Murarka
March 19, 2002 14:53
processing multiple records simultaneously
Message ID:
Hi Everyone,

My first post to the list. And I really am new to Perl.

I need to write a script which is always on, and keeps checking a table 
in MySQL for new records. When it finds one, it has to do certain 
processing on it. The script should be able to process multiple records 
simultaneously (and independently) if it finds several new records at 
the same time.

I was thinking of doing this by writing a script which would run as a 
daemon (to keep checking the table for new records) and in the while 
loop of this daemon, if the script finds a new record, I would call 
another script (for processing the record) using exec where I would 
pass the primary key of that record.

My query:
1. Is this the proper way to do it? 
2. When calling exec 'perl $primarykey' are multiple 
instances of this script created which would each 
process the record whose primarykey is given to it?
3. Where can I get an example of Proc::Daemon?

Thanks a ton


 Vani Murarka                          <>
 Manaskriti Software Solutions
 Bangalore, India                          Ph: 91-80-5262275

  - Web Development / List Hosting & Consultancy Services -
_____________________________________________________________ Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About