The $ anchor is important if your filenames can contain multiple periods.$ext_re = '\.(?:' . join('|', @exts) . ')$'; find(\&wanted, $root); sub wanted { if (/$ext_re/o) { print "$File::Find::dir/$hold\n"; } }
In reply to Re: Better way to search?
by chipmunk
in thread Better way to search?
by r.joseph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |