No no no no no no no. The FAQ strongly suggests against this,
and for many reasons:
- grep() does not short circuit -- once it finds a match,
it will keep going through the rest of the list
- the regex you use is compiled EVERY SINGLE TIME -- this
can be slow and irritating
- the regex you use will say ('foo','bar','blat') contains
the element 'ar', even though it doesn't
- you shouldn't even correct the regex (that is, add the
\A and \z anchors, and \Q and
\E escapes), you should use $_ eq $bar
- DON'T USE GREP
$_="goto+F.print+chop;\n=yhpaj";F1:eval