in reply to File extension match
First, use the qq() or q() function instead of escaping quotes:
Next, to deal with mulitple matches:$test = qq[some_text="asdfasdftest.123"]; # or, because you weren't interpolating: $test = 'some_text="asdfasdftest.123"';
# untested. @extensions = qw( 123 456 ); $match = join '|', @extensions; if ( $test =~ /($match)$/ ) # etc
--Bob Niederman, http://bob-n.com
All code given here is UNTESTED unless otherwise stated.
|
|---|