in reply to Re: Prune File Find search
in thread Prune File Find search
use strict; use File::Find; my $startDir = '/mypathhere'; unless (-d $startDir) { die "Directory '$startDir' is not a Directory.\n"; } find({ preprocess => sub { return grep { not(-d and /dir(?:dirOne|dirTwo|dirThree)/) } @_ }, wanted => \&processSub, }, $startDir); sub processSub { if(-d $_) { print "$File::Find::name\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Prune File Find search
by broquaint (Abbot) on Jul 28, 2003 at 15:52 UTC | |
by Anonymous Monk on Jul 28, 2003 at 16:33 UTC |