in reply to Polling a file for changes - Best Practices?
I've used inotifywait for file polling several times. Usually without any module, just
open my $inotify, '-|', do { no warnings 'qw'; qw( inotifywait -m -r -e close_write -e moved_to --exclude /\ +.git/|~$|/#[^/]+# . ) } or die $!; while (<$inotify>) { my ($path, $event, $file) = split; $thread_queue->enqueue("$path$file") if $event =~ /$expected/; }
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Polling a file for changes - Best Practices?
by Veltro (Hermit) on Mar 05, 2020 at 08:57 UTC | |
by choroba (Cardinal) on Mar 05, 2020 at 09:45 UTC | |
Re^2: Polling a file for changes - Best Practices?
by Tommy (Chaplain) on Mar 04, 2020 at 23:19 UTC | |
by choroba (Cardinal) on Mar 04, 2020 at 23:29 UTC | |
by Tommy (Chaplain) on Mar 04, 2020 at 23:47 UTC | |
by dasgar (Priest) on Mar 05, 2020 at 00:23 UTC | |
by hippo (Bishop) on Mar 05, 2020 at 09:21 UTC | |
by Tommy (Chaplain) on Mar 06, 2020 at 04:59 UTC |
In Section
Seekers of Perl Wisdom