in reply to regex "o" modifier

The best heuristic is:

Never use /o
Using /o made some sense in Perl 4. These days, it mostly doesn't provide much performance improvement (regexes are only recompiled when they need to be, so the best you can get from /o is avoiding a string comparison) and it is easy to introduce bugs by using /o.

If you really need a performance boost and /o actually applies, then you'll get the same performance boost by using qr// instead of /o and you'll have code that makes sense.

                - tye