Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: A regular expression (or regex)

by kennethk (Abbot)
on Aug 16, 2010 at 14:22 UTC ( [id://855287]=note: print w/replies, xml ) Need Help??


in reply to A regular expression (or regex)

This is answered in Optimizing pattern evaluation in perlretut:

If $pattern won't be changing over the lifetime of the script, we can add the //o modifier, which directs Perl to only perform variable substitutions once

It wouldn't make sense to use this optimization in the context you've shown - even if it were embedded in a loop, there is no variable being interpolated.

A point on formatting posts - please do not use <pre> tags. Rather, write normal text, separate paragraphs with <p> tags and wrap your code in <code> tags. See How do I post a question effectively?.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://855287]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-18 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found