in reply to Finding files in a directory tree from and array of file names

In addition to pixel's and tommyw's remarks, there is this. In targetfind() you may have trouble from regex metacharacters in $srcfile, particularly in using windows style paths. This will correct the problem:

print "$_ target found\n" if -f and /\Q$srcfile\E/;
I'd be inclined to make the sub targetfind{} anonymous within the find call to prevent its use outside the lexical scope of $srcfile.

After Compline,
Zaxo

  • Comment on Re: Finding files in a directory tree from and array of file names
  • Download Code