in reply to Running a Trigger

Do you have access to cron? It might be better to have a script run every 5 minutes (or less, or more, depending on the frequency these files come in), in which you can check the time stamp using the stat() function, compare it against the last time it was run (saved in a file somewhere), and decide what actions to take at that time. While you could have a perl script that runs indefinitely, continually scanning the blessed dir until something new comes in, this is going to eat your CPU like there's no tomorrow.
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

Replies are listed 'Best First'.
Re: Re: Running a Trigger
by asiufy (Monk) on May 15, 2001 at 01:35 UTC
    Well, not if you sleep() for, say, 1 minute between scans.

      Before you start looping with sleep() indefinitely, you might want to take a look at Have children maintain themselves or main script maintain children. Some good points are made in that thread about the memory use, process longevity, and garbage collection issues.

      Just thought it was worth mentioning. And it was interesting reading!

      D a d d i o