http://qs321.pair.com?node_id=75782

OzzyOsbourne has asked for the wisdom of the Perl Monks concerning the following question:

I was using the following code to extract certain files with file::find. It works fine if I name individual files. I thought I'd get slick and try to make it shorter by using mp?? to replace mpeg, mp3, mp2, etc. and I replaced rmj, rmx, etc with rm?.

Problem is, now it doesn't find any of these files. What am I missing?

sub wanted { if (!("$File::Find::dir"=~/}/)&&(/\.asf$|\.mp??$|\.avi$|\.exe$|\.wav$|\.z +ip$|\.mov$|\.rm?$|\.wma$/i)){ print OUTFILE "$_\n"; print "$_\n"; }

Thanks, again.

-OzzyOsbourne