in reply to Re^12: Reusing a complex regexp in multiple spots, escaping the regexp
in thread Reusing a complex regexp in multiple spots, escaping the regexp

I did some research and couldn't find a bug introduced by /o.

Please demonstrate one, which is not just someone complaining that it acts differently, or misunderstood the o for optimize instead of once.

It's like complaining about state being buggy since it acts differently to my ...

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

  • Comment on Re^13: Reusing a complex regexp in multiple spots, escaping the regexp

Replies are listed 'Best First'.
Re^14: Reusing a complex regexp in multiple spots, escaping the regexp
by tobyink (Canon) on Apr 17, 2026 at 14:03 UTC

    It's like complaining about state being buggy since it acts differently to my ...

    Indeed, that's exactly what it is. Why it could be considered buggy in the case of "/o" though is that it's poorly documented, rarely desired, and very easy to miss when debugging because it's a single character often hidden away in the middle of or at the end of an expression, instead of a full keyword at the start of statement like state.

      The poor and distributed¹ documentation is the problem

      And the way perldocs are often handled as witty prose resulting from group dynamics instead of being based on evidence (i.e. test cases).

      I don't think it's ever appropriate to flag a feature "buggy"

      • if there are unexpected side-effects a "warning" should be explained in a footnote.
      • if they are really "buggy", they should be disabled.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

      ¹) perlop has far more than perlre and perlretut has only a "\o ... beyond the scope of this introduction" ...