in reply to File::Find how to prevent processing the subdirectory

Use the preprocess option in find.
my $dir = "wherever"; my %options = ( preprocess => \&filterOutSubdir, wanted => \&wanted, ); finddepth(\%options, $dir);
I just learned this yesterday from the monks :). It is a really powerful tool. More here: Beginners guide to File::Find