Re: YARQ: Yet Another Regex Question 

Chas Owens wrote:
> On 5/16/07, Mathew  wrote:
> snip
>> What does gr() do?
>>
>> Mathew
>>
> 
> qr not gr.  It is the quote regex operator.
> 
> from perldoc perlop
>       qr/STRING/imosx
>               This operator quotes (and possibly compiles) its STRING as a
>               regular expression.  STRING is interpolated the same way as
>               PATTERN in "m/PATTERN/".  If "'" is used as the delimiter, no
>               interpolation is done.  Returns a Perl value which may be
> used
>               instead of the corresponding "/STRING/imosx" expression.
> 

Ahh, yes that would certainly work better.  One of my concerns was using
a bare string containing a space.  While it may not break it could cause
problems down the road.  Something I'd like to avoid.

Thanks
Mathew

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


