in reply to Re: Re: regex "o" modifier
in thread regex "o" modifier

You cannot apply modifiers to a regex object after it has been defined. Rewrite this as qr!yes|no!o. And the answer to your question is that yes the o modifier comes into play with qr// and locks in the regex the first time it is used.

Replies are listed 'Best First'.
Re: Re: Re: Re: regex "o" modifier
by Popcorn Dave (Abbot) on May 07, 2003 at 03:52 UTC
    Thanks! Now it makes sense.

    But it does make me question one other point. If I don't use the /o in the qr!yes|no!o, if I loop over a set of values using the qr'd regex, does it recompile it every time?

    There is no emoticon for what I'm feeling now.

      Nope, it won't recompile every time. That's the benefit of using qr.

      J