in reply to Re: Combinations of lists to a hash
in thread Combinations of lists to a hash

> "...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.

Replies are listed 'Best First'.
Re^3: Combinations of lists to a hash
by Anonymous Monk on Oct 04, 2019 at 23:40 UTC
    Perlmonks is not a code writing service. Please show some efforts.

      At least the effort to use  <code> ... </code> tags.


      Give a man a fish:  <%-{-{-{-<

        Sorry, AnomalousMonk. It's been a while since I used PerlMonks and I had forgotten, so I was going to the effort of using 'pre' tags instead. I'll try to remember. What are the main advantages of 'code' tags over 'pre' tags, anyway? Just the download option?