OP had only

Indeed. Equally, the OP didn't use a void context and a capture variable per Re: Capturing regex from map, but that didn't stop you posting a polemic troll falsely equating the two (despite that you'd already pointed out they were not the same) for no reason other than to have a personal dig.

The difference between your post and mine, is that mine is intended to point out that the construct -- a regex within the list context of a map assigning to an array -- is very powerful, even beyond the simple use the OP put it to. And that if you take the time to understand why the OPs example works, then the other more powerful uses -- such as the one I demonstrated -- are equally easy to understand and therefore utilise.

FWIW:

Not very much. Actually, a negative amount.

All you did was put the regex into a localised list context by constructing a scoped array; and then convert that array to the list that would have been constructed had you left things alone. That's pointless make-work.

Anyone who understands that assigning a regex to an array assigns the captures; is equally capable of understanding that the same regex in the list context of a map statement assigned to an array will do the exact same thing.

You understand it. But you somehow think that other people won't. That you have to clarify the obvious for them by some utterly pointless make-work. You are advocating that 'other people' should dumb down their code, because some other 'other people' might not understand it like you do.

Suggestion: do not seek to intellectually diminish those 'other people'; seek to educate them.

If you can understand; and I can understand it; it is a fair bet that with just a little exposure; they will understand it too. It's neither that complicated, nor undocumented.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^6: Capturing regex from map by BrowserUk
in thread Capturing regex from map by trippledubs

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.