"Jay Savage" <[EMAIL PROTECTED]> writes: > Finally, Tom's points are important. How do you *know* that the files > (in this case a single directory) changed *during the sleep*? Do you > know that the output wasn't buffered? That the system didn't delay the > writes for some reason? That you were even watching the files you > thought you were?
> Your best bet to make sure the module is working would, instead of > sleeping between scans and trying to modify the watched files from an > external process during a narrow window, would probably be to perform > your initial scan; open one of the watched files for writing; write to > it; flush the buffer; close it; and then rescan. Sounds like a plan for testing but the end result sought in this case is a monitor that *will* see changes done by external processes in some reasonable time frame. (Assuming for a moment I do get it figured out with the help in this thread how to use File::Monitor) How long of a sleep would be required to *KNOW* a change has happened with something external writing to files? Is there no way to guess that closely... too many variables may come into play? Or could one create a monitor that will *know* inside of ten seconds that a file has been written to? Would *knowing* about file creation have the same problems? Or is that something the monitor would *know* for sure quickly? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/