I know there's a good reason having to do with the definition of grep, but I mean *really*.use constant REGEXP => qr(string); @list = ('astring', 'notstriing'); $s = 'bstring'; print $s =~ REGEXP; # true print grep {REGEXP} @list; # prints whole list. print grep {/string/} @list; # prints correct match.
In reply to grep {CONSTANT} @list by creeble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |