Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Comment on

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

I use those a lot, to the point where I'm thinking of putting 'use Data::Printer' in the blank template I use to start a new Perl script, since I always end up adding it during testing anyway. But in this case, there are two reasons I didn't:

  • Those modules print several lines to show a single value. That's fine to display a single structure once at a certain point, but to do it repeatedly in a loop can give you a heap of output that would be difficult for a newbie to parse through.
  • I have a feeling his real problem is with program flow. I think he's going to discover that where he thinks he's seeing the whole array printed, he's really seeing one element of the array printed each time through the loop, but with nothing else being printed between them, they look like one output. To see that, he doesn't need to see the structure of @results just once; he needs to see how his program is flowing and how that array is changing with each step.

So in this case, in my opinion, changing my print/join statements to 'print Dumper @results' could make it harder for him to see the problem.

Aaron B.
Available for small or large Perl jobs; see my home node.


In reply to Re^3: An Array Without and Index by aaron_baugher
in thread An Array Without and Index by Toppo

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, 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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2018-08-17 21:29 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Asked to put a square peg in a round hole, I would:









      Results (184 votes). Check out past polls.

      Notices?