Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Monitoring directory contents

by Discipulus (Abbot)
on Apr 08, 2014 at 10:59 UTC ( #1081486=note: print w/replies, xml ) Need Help??


in reply to Monitoring directory contents

it is not simpler a solution like:
## pseudo code: my %cache_of_already_read_files; my $sleep_between = 300; while (1){ my @xml = &get_xml_files_names; # opendir, system (ls).. foreach (@xml) { next if exists $cache_of_already_read_files{$_}; $cache_of_already_read_files{$_} = 'found at'.scalar (localti +me(time)); &my_copy_to_destination ($cache_of_already_read_files{$_} ); } sleep $sleep_between; }
HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-08-17 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?