Perhaps $File::Find::prune will work:
sub dir_names { # Skip over everything that is not a directory. Note that # chdir means we can use -X file tests on default $_. -d or return; # Skip over directories that don't match required pattern. # Match against $_ instead of entire directory path. /^[IPD]\d{8}$/ or return; print "$File::Find::name\n"; # Do not recurse below current directory. $File::Find::prune = 1; }
In reply to Re: File:Find pattern match question
by Anonymous Monk
in thread File:Find pattern match question
by RockE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |