dru145 has asked for the wisdom of the Perl Monks concerning the following question:
Thanks,use File::Find; use strict; use warnings my @exts = qw(.html .jpg); my $search_root = 'C:\\temp\\'; # Build a Regex my $rexstr=join'|',map {quotemeta $_} @exts; my $rex=qr/(?:$rexstr)$/i; # Directory to ignore my $dir = qr/pics/ find({ wanted =>sub{print "Found a match: $_\n" if (/$rex/);} , no_chdir => 1 }, $search_root);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ignoring a Directory with File::Find
by fruiture (Curate) on Nov 12, 2002 at 20:13 UTC | |
by dru145 (Friar) on Nov 12, 2002 at 21:37 UTC | |
|
Re: Ignoring a Directory with File::Find
by John M. Dlugosz (Monsignor) on Nov 12, 2002 at 20:24 UTC | |
|
Re: Ignoring a Directory with File::Find
by FamousLongAgo (Friar) on Nov 12, 2002 at 20:25 UTC | |
by princepawn (Parson) on Nov 12, 2002 at 20:31 UTC | |
|
Re: Ignoring a Directory with File::Find
by Monky Python (Scribe) on Nov 13, 2002 at 08:54 UTC |