in reply to Need help with File::Find
use File::Find; my @exts = qw( jpg gif tar gz bat txt ); my @excludes = qw( winnt cygwin ); my $ext = join '|', map{quotemeta} @exts; my $exclude = join '|', map{quotemeta} @excludes; my $base = '/cygwin'; find( sub { push @datein, $File::Find::name if m/\.(?:$ext)$/oi and $File::Find::name !~ m!/(?:$exclude)!oi; }, $base ); print "$_\n" for @datein;
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Need help with File::Find
by ppm (Novice) on Feb 26, 2003 at 15:54 UTC | |
by jeffa (Bishop) on Feb 26, 2003 at 16:33 UTC | |
by ppm (Novice) on Feb 26, 2003 at 17:14 UTC | |
by ppm (Novice) on Feb 26, 2003 at 17:22 UTC | |
by tachyon (Chancellor) on Feb 26, 2003 at 16:07 UTC |