find(\&wanted,$root); sub wanted { if (/\.(\w*)/) { foreach (@exts) { if (lc($1) eq $_) { print $File::Find::dir,"/",$hold,"\n"; } } } }