in reply to Re: File::Finder usage
in thread File::Finder usage

Your function is susceptible to the same usage mistake that caused the original problem. This:

my @files= File::Finder->name($­file)->in(@directori­es); return wantarray ? @files : "@files";

or another use of wantarray might more appropriate. I'm using the Unix shell globbing scheme of error detection -- return something that isn't an existing file so that when you go to use it you should get an error message that contains useful information. There are more robust approaches and the best choice depends.

- tye