Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

cdarke's scratchpad

by cdarke (Prior)
on Apr 27, 2006 at 00:44 UTC ( [id://545917]=scratchpad: print w/replies, xml ) Need Help??

use Win32::ChangeNotify; my $Path = 'C:\\QA'; my $Events = 'FILE_NAME'; my $notify = Win32::ChangeNotify->new($Path,0,$Events); my %dir; @dir{glob("$Path\\*")} = undef; while (1) { print STDERR 'Waiting...'; $notify->wait or warn "Wait failed: $!\n"; $notify->reset(); my @files = glob("$Path\\*"); my @added = grep {!exists $dir{$_}} @files; print "Filenames added: @added\n" if @added; delete @dir{@files}; my @removed = keys %dir; print "Filenames removed: @removed\n" if @removed; undef %dir; @dir{@files} = undef; } $notify->close();
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-03-29 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found