Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

As an aside, in situations such as this one I like to use “data walkers” whenever possible ... search for the keyword walker at and you will see what I mean.   (Say, Data::Leaf::Walker ... there are 110 packages today to choose from.)   This lets me “let the Walker do the walking” through the now-arbitrary data structure that I have been given, and to call my subroutines only for the elements of interest to me no matter where exactly they happen to be.   If the data structure changes, my code still works.   Some of these are simple; others more-or-less emulate the approach of “XPath expressions” in XML.   While this notion is certainly not of a nature that “you should always do this” – not by any means – it is a useful technique to keep in the back of your pocket-protector.

I used this technique very successfully to winnow through parse-trees that were produced from a nasty collection of SAS® programs, Korn shell scripts, and Tivoli® workload schedules.   Truly an ugly project to design and build, but it worked splendidly, thanks in very large part to this technique.

In reply to Re: json data: dereferencing arrays by sundialsvc4
in thread json data: dereferencing arrays by hulketa

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (4)
    As of 2018-03-18 12:19 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (230 votes). Check out past polls.