> "...you made me add one whole line to my program to handle your update..."
Yeah, sorry about that.  I tried to make it harder, honest!

Yes, that is valid, thank you very much tybalt89!  Nice work - you forced me to vote again.

I've added a 4th update to my original post, which may help you to simplify your code, while helping me...again.

BTW, how did you notice my update?  Just by chance or did you get some kind of message?  Just wondering whether I need to bring it to the attention of others who have provided solutions...though I may well go with yours.

Update: In response to Anonymous Monk's (quite valid) rebuke below, I've realised that my 4th update in my original post simply required the removal of a couple of '=' signs from 1 line of tybalt89's last solution, i.e.:

#@lines = map /^=:\s*,^=:\s*/ ? map "$`$_$'", split /,/, $& : $_, @lines
@lines = map /^:\s*,^:\s*/ ? map "$`$_$'", split /,/, $& : $_, @lines
Well, it seems to work, anyway.  If there's better way to make that adjustment, I'm all ears.

In reply to Re^2: Combinations of lists to a hash by tel2
in thread Combinations of lists to a hash by tel2

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.