Lorenzo said:
I want to monitor a directory for changes, but I don't want to poll
periodically to see if anything has changed. Is there a way to get
notifications in Perl about changes to a particular directory.
TIA
This isn't really a problem that Perl alone can solve. Essentially you
must poll and there are a few ways to do that. crontab
http://en.wikipedia.org/wiki/Crontab can be used on Unixish systems to
schedule a script (Perl or otherwise) to run periodically and scan a
directory, for example.
On some systems, like Mac OS X, you can use "folder actions"
http://www.apple.com/applescript/folderactions/ to cause an AppleScript
to run whenever a folder is modified. There may be something similar on
Windows, I'm not sure.
In any case you will need to use something in addition to perl, and
that will be dependent on your OS.