On Jan 5, 12:13 am, [email protected] (Erez Schatz) wrote:
> 2010/1/5 Jeff Peng <[email protected]>:
>
> ...
> This is something that Perl  (post version 5.6) does inherently, which
> is compiling a regex only once as long as the pattern isn't modified.
> Prior to 5.6 you'd need to use the /o modifier (
> m/href="http:\/\/(.*?)\/.*" target="_blank"/o ).
>

Um no.  The /o modifer stops re-compilation only if the regex
needs to interpolate a variable. Otherwise, /o has no effect.
Perl, has always AFAIK, cached regex compilations for re-use
if there aren't variable interpolations since then the regex
can't possibly change.

--
Charles DeRykus





--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to