in reply to Search criteria

You could use a 'preprocess' routine to filter out the unwanted directories. Untested code,

find( { wanted => \&subsearch, preprocess => sub { grep { -f || -d _ && /^AA|BB$/ } @_ } }, $dir );

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Search criteria
by Anonymous Monk on Aug 01, 2003 at 17:07 UTC
    Is the preprocess rountine dependent on Perl version? I have Perl 5.005 version.

      AFAIK, it should work for 5.005. I warned the code was untested, what I wrote is based on how I think it should work. You may need to play with it a bit to tune it up. Check your version of File::Find, too.

      After Compline,
      Zaxo

        Thanks, I got it to work with Perl 5.8 but didnt work in Perl 5.005 so I assume it is a File::Find issue with 5.005.