onkar has asked for the wisdom of the Perl Monks concerning the following question:

I have a situation wherein , if the user puts a file in the directory I need to do processing on the file , and rest of the time s +leep(). How do I detect that there is a change in directory content e +fficiently ( i.e., without listing ). while(1) { probe_dir_changes(......); sleep(1); }

Replies are listed 'Best First'.
Re: Checking Directory contents in Perl
by stefbv (Priest) on Dec 17, 2009 at 07:23 UTC