If you think that a question deserves a useless answer, then why bother answering?
I didn't think my answer was useless.
Furthermore we were given exact input and an exact desired result.
One way to get that result would be to ignore the input entirely and just hardcode the assignments. But it wasn't a question about achieving a result, it was about what techniques would be used, and I answered that question.

Your approach is your approach, and mine is mine. The wonderful thing about PerlMonks is that there are many different approaches, and no one approach of them will be ideal for every situation, but often enough, at least one of them will hit the nail on the head.

In this case, my approach was to give the OP a few key concepts about which he could educate himself to achieve the desired result. I'm sorry that it chafed you so much.


The PerlMonk tr/// Advocate

In reply to Re: regex issue response gripe by Roy Johnson
in thread regex issue by Anonymous Monk

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.