#!/usr/bin/perl # dirpath use strict; use warnings; use File::Find; #*****************Path Variables********************** our $testpath = 'C:\\Temp\\'; #******************************************************* find ({ wanted => \&wanted, preprocess => \&preprocess }, $testpath); sub wanted { return unless -d; print "$File::Find::dir/$_\n" if /[IPD]\d{8}$/; } sub preprocess { if ($File::Find::dir =~ /[IPD]\d{8}$/) { return; } else { return @_; } }
In reply to Re: Limiting file:find depth question
by kschwab
in thread Limiting file:find depth question
by RockE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |