in reply to Nested Quantifier Headaches
if ( grep {/^\Q$ITEM\E$/} @ARRAY ) {
A more extensive explanation of \Q and \E can be found in the perlre documentation.
Update: Just realized that you may be better off not even using a regex for this. Since you're looking for an exact string match, you can also use eq, like this:
if ( grep {$_ eq $ITEM} @ARRAY ) {
-- Mike
--
just,my${.02}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Nested Quantifier Headaches
by keywest (Initiate) on Jun 05, 2003 at 19:06 UTC |