in reply to Need help with File::Find
See the File::Find::Rule docs for more info on this fabulous module.use File::Find::Rule; my $ext = "html|php"; my $dirs = "(?:cgi-bin|log)"; my $base = "c:/blub"; my @files = find(not => rule( directory => name => qr/^$dirs/ => prune => ), file => name => qr/\.(?:$ext)\z/, in => $base);
_________
broquaint
update: code now corresponds to question
update 2: added grouping to $dirs missing from original data
update 3: fixed code re runrig's comments. sigh this just ain't my node
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Need help with File::Find
by tachyon (Chancellor) on Feb 26, 2003 at 15:50 UTC | |
|
Re: Re: Need help with File::Find
by runrig (Abbot) on Feb 26, 2003 at 19:58 UTC |