find(\&all, @allpaths);
open (LIST, ">$filepath/Paths.bak") or die "$! error trying to overwrite";
foreach my $p (@allpathlisting)
{
print LIST "$p\n";
}
close LIST;
copy $allpatholdfile, $allpathnewfile or die "$! error trying to copyfile";
sub all {
return unless -d;
$File::Find::prune = 1 if /[IPDLMY]\d{8}$/;
(my $fn = $File::Find::name) =~ tr#/#\\#;
push @allpathlisting, $fn if /[IPDLMY]\d{8}$/;
print "$fn\n" if /[IPDLMY]\d{8}$/;
foreach (@allpathlisting)
{
s/gpfs_data/nas\/rdds/;
}
}
####
foreach (@allpathlisting)
{
s/gpfs_data/nas\/rdds/;
}
####
(my $fn = $File::Find::name) =~ tr#/#\\#;