Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Regexes and /o

by blakem (Monsignor)
on Oct 09, 2002 at 04:02 UTC ( #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
Node Status?
node history
Node Type: note [id://203823]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2019-08-22 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?