in reply to Re: [OT - Separator character]: Best Practice: Order of regex modifiers?
in thread Best Practice: Order of regex modifiers?

Agreed! or a grouping syntax

s{ ... }{...}{xms geep o}

Anyway I think you could already use the x as such if you are careful about whitespaces.

Like s{ ... }{...}msxgeepxo

OTOH it doesn't look much better!

BTW: the use of o seems to be discouraged.

http://stackoverflow.com/questions/550258/does-the-o-modifier-for-perl-regular-expressions-still-provide-any-benefit

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^3: [OT - Separator character]: Best Practice: Order of regex modifiers?
by AnomalousMonk (Archbishop) on Feb 01, 2017 at 19:08 UTC
    ... the use of o seems to be discouraged.

    I only latched onto  /o because I was casting about for something to use in a manufactured example.

    AFAIU, the  /o modifier is only useful now in those very limited cases in which one wishes to prevent recompilation of a  qr// m// s/// even when interpolated Regexp objects or strings have changed. My understanding is that these operators will not now recompile on each execution unless an interpolated regex/string has changed.


    Give a man a fish:  <%-{-{-{-<

      AFAIU, the /o modifier is only useful now

      Hi, check the link, /o has been useless since about 5.6, the docs really ought to read o - pretend to optimize your code, but actually introduce bugs and perl ought to reject /o outright :)

      Also, there is no way this thread is off topic, thats some serious lack of caffeine