invoking it within the sub function & log.
sub Get_FileList{ @files=(); @todel=(); $logger->info(Carp::longmess("TRACE1")); find (sub { $logger->debug("Reached $File::Find::name"); $logger->info(Carp::longmess("TRACE2")); push @files,$File::Find::name if (-f $File::Find::name and + /\.*$/ and stat($File::Find::name)->mtime > $lastepoch); push @todel,$File::Find::name if (-d $File::Find::name);}, + $indir); $logger->info(Carp::longmess("TRACE3")); $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."); }
logging below. i guess it is really getting stuck when it tries to traverse the mapped drive
04-12-2017 04:06:56:570 INFO TRACE1 at perl.pl line 85. 04-12-2017 04:06:56:577 DEBUG Reached Z:/ 04-12-2017 04:06:56:577 INFO TRACE2 at C:/Strawberry/perl/lib/File/F +ind.pm line 358. File::Find::_find_dir(HASH(0x5174bd8), "Z:/", 1) called at C:/Stra +wberry/perl/lib/File/Find.pm line 236 File::Find::_find_opt(HASH(0x5174bd8), "Z:/") called at C:/Strawbe +rry/perl/lib/File/Find.pm line 760 File::Find::find(CODE(0x4e8b7b8), "Z:/") called at perl.pl line 11 +8 main::Get_FileList() called at perl.pl line 85
In reply to Re^2: Execution hangs on File::Find
by colox
in thread Execution hangs on File::Find
by colox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |