Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Regexes and /o

by blakem (Monsignor)
on Oct 09, 2002 at 04:02 UTC ( [id://203823]=note: print w/replies, xml ) Need Help??


in reply to Regexes and /o

What version of perl are you using? In recent versions (5.6.0 and later I believe) the penalty for not using /o was greatly reduced.

So, /o isn't really much of a gain anymore because the worst case scenerio it was designed to avoid is no longer applicable.

-Blake

Replies are listed 'Best First'.
(tye)Re: Regexes and /o
by tye (Sage) on Oct 09, 2002 at 06:20 UTC

    Yes! Precisely! And since you can use qr// for when you want maximum speed and maximum control, there is no reason to ever use /o. Ever!

    It should be deprecated from the language because the best it can do now is provide a slight speed boost (which you can still get by using qr// instead), but the worst it can do is break your code.

    Most of the times I see people use or recommend /o these days are cases where it makes absolutely no difference at all, or where it breaks their code.

            - tye (see also /o considered harmful)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-24 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found