However the first function from List::Util is better suited for this situation e.gdo_something(@compare) if grep { $test =~ $_ } @compare;
use List::Util 'first'; do_something(@compare) if first { $test =~ $_ } @compare;
_________
broquaint
In reply to Re: Regular expressions and Arrays
by broquaint
in thread Regular expressions and Arrays
by wilbur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |