Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
For some reason I couldn't see where the scalars and arrays were in this.
Here's a tool you already have to help you with this: Perl debugger!

Use the x command to see what a variable holds. It shows you the complete structure as if it were an array at the top level. (So hashes show up better if you escape the percent sign, as in the first example below).

c:\perl\perl>perl -de 0 Loading DB routines from version 1.28 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(-e:1): 0 DB<1> %x = ( 123, [ qw(one two three) ], 456, [ qw(four five six) ], + 789, [ qw(seven eight nine) ] ) DB<2> x \%x 0 HASH(0x1d6c490) 123 => ARRAY(0x15d52a4) 0 'one' 1 'two' 2 'three' 456 => ARRAY(0x1d6c628) 0 'four' 1 'five' 2 'six' 789 => ARRAY(0x1d6c664) 0 'seven' 1 'eight' 2 'nine' DB<3> @x = ( { 1, "one", 2, "two", 3, "three" }, { 4, "four", 5, "fi +ve", 6, "six" }, { 7, "seven", 8, "eight", 9, "nine" } ) DB<4> x @x 0 HASH(0x1d70b24) 1 => 'one' 2 => 'two' 3 => 'three' 1 HASH(0x1d97a78) 4 => 'four' 5 => 'five' 6 => 'six' 2 HASH(0x1d97ab4) 7 => 'seven' 8 => 'eight' 9 => 'nine' DB<5>

Quantum Mechanics: The dreams stuff is made of

In reply to Re^3: Sort - can't by QM
in thread Sort - can't by malaga

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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (4)
    As of 2020-11-28 23:27 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found