if File::Find is improved to support patterns, ... But why the Perl community didn't do it? Reason is simple, because of the existance of File::Glob, there is no point to repeat/reinvent the same functionality in another class
Nope. File::Find doesnt have any filtering mechansim explicitly built into it for a very good reason that has nothing to do with File::glob. Basically the callback mechanism used by File::Find is about a million times more powerful than any filtering technique they could have provided. If you want to do pattern matching on the names then just do it in the wanted function:
#perl -l
use File::Find;
find sub{print $_ if -f and /\.txt$/i},@INC;
will print out all text files in a directory reachable from the paths in @INC for example.
And if this really is not sufficient (id be suprised) then take a look at File::Find::Rules
HTH
--- demerphq
my friends call me, usually because I'm late....
|