Add:
$File::Find::prune = @{$dirs{$_}} > 1;
to the end of the version of dir_names I gave in my answer to your previous question:
sub dir_names { return if ! -d || ! /[IPD]\d{8}$/; push @{$dirs{$_}}, $File::Find::name; $File::Find::prune = @{$dirs{$_}} > 1; }
In reply to Re: Limiting file:find depth question
by GrandFather
in thread Limiting file:find depth question
by RockE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |