You said " are you familiar with the '(?<flags>:<pattern>)' regex construct described in perlre: Extended Patterns: (?adluimnsx-imnsx:pattern)? "

Yes, but I seem to be finding "holes" in my memory...i.e. I only remembered the m{ (?i) <pattern> } form... I take it that the ":<pattern>" part allows the flags to apply only to the pattern after the colon and before the end-of-parens...

I readily admit not to knowing how to use every feature in perl's "RE's"... some of which I might use in some odd case, but many of which I put in my "tmp" memory because they are experimental.

Too many features have been "experimental" in perl for too long, and it really gets confusing -- since my conception of "experimental" was something that was being introduced but might not be stable yet -- however -- when something that was intro'd as Xperimental, but then was stable for more than 2 major releases, that really doesn't fall into the category of experimental, but more of of "some developer's personal 'pet feature'", that got introduced, but was never removed when the experiment was "over".

Some of those features were introduced to fill in "holes" in perl (case statement). The "Switch" module that was part of core before 5.8, was deprecated with the introduction of "given/when" and its documentation was changed recommending it's usage. Trouble is, you had a Core module deprecated that in the deprecation notes told you to use "given/when" instead -- when, w/5.18, many years after 5.8, anything that never had the experimental label removed, generate sometimes fatal diagnostics (if you follow advice in most languages to get rid of all warnings, and then make all warnings "fatal").

I tended to think that advice applied to computer languages and good-programming practices, in general -- but 5.18 made it clear that those rules didn't apply to perl. ;^/ (*sigh*)


In reply to Re^2: 'g' flag w/'qr' by perl-diddler
in thread 'g' flag w/'qr' by perl-diddler

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.