There's still some confusion at the end there. If I understand your problem, I think you want this:
for my $dir ( @directories ) { find(\&process_directories, $dir); } sub process_directories { if ($File::Find::dir ne $dir) { $File::Find::prune = 1; return 0; } return 0 if ($_ !~ /\.rtf$/); copy($File::Find::name, "C:\\testfiles\\$_") or die "Failed to cop +y $_: $!\n"; return 1; }
In reply to Re: Recursive file find and copy
by steves
in thread Recursive file find and copy
by NodeReaper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |