On 2007/03/14, at 17:55, Beginner wrote:
Hi, I am trying to find a means of monitoring a directory for activity. I would like a perl process to aware if a file has been dropped into a specific folder and then take some action. In the past I have used cron for this but I was thinking this isn't the best choice because 1) You have to spawn a very frequently to try to achieve real-time action 2) The high frequency spawning of a perl script is quite expensive in terms of resources 3) There is the potential for one process to collide with another. One way would be to have a script that did while (1) and a sleep when nothing was found but again this seems "primitive". Is this something that a daemon module might help with? Does anyone have an idea that might help?
If your target OS is Linux, you can try the Sys::Gamin module. You can check the examples on its documentation.
-- Igor Sutton [EMAIL PROTECTED]