in reply to Please HELP! FILE::MONITOR Configuration
This seems to work:
use strict; use warnings; use File::Monitor; my $monitor = File::Monitor->new(); $monitor->watch ( { name => 'C:/whatever', # or whatever callback => \&print_new, files => 1, } ); while ( 1 ) { $monitor->scan; sleep 10; # or however long you need } sub print_new { print join "\n", pop->files_created; print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Please HELP! FILE::MONITOR Configuration
by jdlev (Scribe) on Jan 30, 2009 at 15:13 UTC |