in reply to Getting File Type using Regular Expressions
With reference to your particular question, alternation will help here:
if ($filename =~ /\.(jpg|gif|bmp|doc|txt)$/ { print "Found a match\n"; }
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Getting File Type using Regular Expressions
by bkiahg (Pilgrim) on Apr 21, 2004 at 13:36 UTC |