in reply to Re^2: File::Monitor problem with batch files
in thread File::Monitor problem with batch files
It actually was working just as it should work. I called scan twice, so it shut down. I don't think that you need a while loop. For example, you can turn on the monitor, and it will dutifully observe what it's supposed to watch:
Now the monitor is on. It will stay on until you call the second scan---then it reports the changes and shuts off.#!/usr/bin/perl use strict; use warnings; use File::Monitor; my @Files = qw(1.doc 2.doc 3.xls); my $wFileMonitor = File::Monitor->new(); foreach my $wFile(@Files){ $wFileMonitor->watch($wFile); } $wFileMonitor->scan;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: File::Monitor problem with batch files
by xbmy (Friar) on Nov 18, 2010 at 14:53 UTC | |
Re^4: File::Monitor problem with batch files
by xbmy (Friar) on Nov 18, 2010 at 19:33 UTC |
In Section
Seekers of Perl Wisdom