I meant to comment on these in my first response.

"About the "use 5.020000" pragma, ..."

Seems like a good choice; however, the perldeltas (see below), for both v5.22 and v5.24, could have bug fixes, which may affect this choice. Having said that, you need to consider what versions of Perl are available to users of your code.

[The use function documentation recommends "use 5.020_000;" (i.e. with underscore) as the preferred format, for reasons of backwards-compatibility. I also find it far easier to read.]

"As far as I know, the regex-related constructs that I use (including (?{CODE}), (?&NAME), $^N, $^R, etc) are all supposed to be supported by 5.010 and up."

Beyond being "supported", are you concerned with features being experimental? perlexperiment may be useful in this regard. It has "(?{code})": experimental in v5.006 (see perl56delta: Experimental features); accepted in v5.020 (compare perlre (v5.018_002) with perlre (v5.020_000)).

The construct, "(?{code})", has been supported since v5.005_000 (see perl5005delta: Regular Expressions). In v5.018_000, perl5180delta: /(?{})/ and /(??{})/ have been heavily reworked.

A quick way to gather this type of information, is to first find an @INC path with a pods subdirectory (I only found one: YMMV) and change to it:

$ perl -E 'say for grep { -e && -d } map { $_ . q{/pods} } @INC' /six_dir_path/lib/5.24.0/pods $ cd /six_dir_path/lib/5.24.0/pods $

Now search the *.pod files for the construct:

$ grep -l '(?{' *.pod ... 13 delta pods; 14 other pods ...

Update: Added " [Part 2 of 2]" to the title to differentiate this node, "Re^3: Weirdness (duplicated data) while building result during parsing using regex", from another of the same name, "Re^3: Weirdness (duplicated data) while building result during parsing using regex" (which will have " [Part 1 of 2]" appended).

— Ken


In reply to Re^3: Weirdness (duplicated data) while building result during parsing using regex [Part 2 of 2] by kcott
in thread Weirdness (duplicated data) while building result during parsing using regex by perlancar

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.