It goes on to say that it is just syntactic sugar
They are indeed syntactic sugar. But I prefer to write: /a++/ over /(?>a+)/. 2 special characters instead of 5.

As for the OPs question, the main use is performance - specially in cases of not matching. Using possessive quantifiers changes the meaning - unlike non-greedy matches, possessive quantifiers can change the matching/non-matching behaviour. That is, given a pattern, making quantifiers non-greedy (or making non-greedy quantifiers greedy) will not change the set of strings the pattern matches, but making quantifiers possessive can change the set (but only by reducing the set). But I would recommend using possessive quantifiers for that effect - that's just too subtle.


In reply to Re^2: When would I want to use possessive quantifiers? by JavaFan
in thread When would I want to use possessive quantifiers? by petdance

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.