Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Please HELP! FILE::MONITOR Configuration

by Not_a_Number (Parson)
on Jan 21, 2009 at 22:19 UTC ( #737977=note: print w/ replies, xml ) Need Help??


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"; }


Comment on Re: Please HELP! FILE::MONITOR Configuration
Download Code
Replies are listed 'Best First'.
Re^2: Please HELP! FILE::MONITOR Configuration
by jdlev (Scribe) on Jan 30, 2009 at 15:13 UTC
    Outstanding! I tried it, and in 2 minutes, the program was up and running after fiddling with it for hours! Thanks so much, you get the vote! :) :)
    I love it when a program comes together - jdhannibal

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://737977]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (19)
As of 2015-07-30 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls