Hi Loops,

Thank you once again.

I haven't yet tested your version, but have spent some time reading / understanding its functionality. It appears to be a much more elegant solution. I particularly approve its ability to try to do the right thing when a selectee is blank / missing, this will be beneficial in shortening long url query strings, I now wonder if its possible to do something similar with repetitive hash keys. I also thought the block handling the += was nicely thought out, I was unable to come up with a one line notation myself, though I will probably combine the push to remain consistent with the corresponding if. Finally, due to using an outdated Perl version, I will have to write an alternative to the regexp r flag (handle in two steps, or use do).

I will have to perform vigorous testing and get back to you if I have any outstanding concerns, but this was exactly what I needed, you've killed two birds with one two stones between your two replies, I'm very grateful for your expertise and time. I'm also working on an _undive function (reverse dive / ref to selector), which is proving to be tricky, but I'm getting there.

Chris


In reply to Re^4: Dive data with automatic array indexing by peterp
in thread Dive data with automatic array indexing by peterp

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.