Dear Monks, I have this puzzling issue with my program & I really hope you could guide me as usual. Below code is part of my program where it checks for files. It works perfectly fine if the directory being checked ($indir) is a local folder. But it seems to "freeze" (does not throw any error) when I changed the path to either a mapped drive )e.g. Z:) or absolute path (e.g. //my_path/folders). Your inputs will be greatly appreciated.
sub Get_FileList{ @files=(); @todel=(); find(sub {push @files,$File::Find::name if (-f $File::Find::name a +nd /\.*$/ and stat($File::Find::name)->mtime > $lastepoch);}, $indir) +; find(sub {push @todel,$File::Find::name if (-d $File::Find::name); + }, $indir); $lastepoch = time; #Update last execution time for the next run $logger->info("New execution time update: $lastepoch."); $proccount = scalar(@files); $logger->info("Found $proccount new files since last run."); }
In reply to Execution hangs on File::Find by colox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |