r.joseph has asked for the wisdom of the Perl Monks concerning the following question:
As you can see, the 'wanted' sub is much to...bloated. There must be a better way. I am stupid, I know, so thanks for all the help! R.Josephfind(\&wanted,$root); sub wanted { if (/\.(\w*)/) { foreach (@exts) { if (lc($1) eq $_) { print $File::Find::dir,"/",$hold,"\n"; } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Better way to search?
by chromatic (Archbishop) on Jan 05, 2001 at 06:08 UTC | |
by Kanji (Parson) on Jan 05, 2001 at 06:58 UTC | |
by r.joseph (Hermit) on Jan 05, 2001 at 06:15 UTC | |
by btrott (Parson) on Jan 05, 2001 at 06:17 UTC | |
by r.joseph (Hermit) on Jan 05, 2001 at 06:23 UTC | |
by merlyn (Sage) on Jan 05, 2001 at 06:31 UTC | |
| |
by runrig (Abbot) on Jan 05, 2001 at 10:28 UTC | |
|
Re: Better way to search?
by chipmunk (Parson) on Jan 05, 2001 at 06:40 UTC |