<?xml version="1.0" encoding="windows-1252"?>
<node id="1004985" title="grep {CONSTANT} @list" created="2012-11-21 13:52:02" updated="2012-11-21 13:52:02">
<type id="115">
perlquestion</type>
<author id="325467">
creeble</author>
<data>
<field name="doctext">
Sometimes you just want to scream. ugh.

&lt;code&gt;
use constant REGEXP =&gt; 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.
&lt;/code&gt;

I know there's a good reason having to do with the definition of grep, but I mean *really*.
</field>
</data>
</node>
