With reference to your particular question, alternation will help here:
if ($filename =~ /\.(jpg|gif|bmp|doc|txt)$/ { print "Found a match\n"; }
-Mark
In reply to Re: Getting File Type using Regular Expressions
by kvale
in thread Getting File Type using Regular Expressions
by bkiahg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |