Looking at this in the debugger it seems that XMLin() may not be giving you what you expected:

c:\>perl -d test.pl Loading DB routines from perl5db.pl version 1.19 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(test.pl:6): my $ref = XMLin(<<XML main::(test.pl:7): <config> main::(test.pl:8): <wrapper name="testName 1.0.3" script="/us +r/people/ltorvalds/apps/wrapper.pl" app="testApp.exe"> main::(test.pl:9): <envVar name="TMPDIR" value="/usr/tmp" +/> main::(test.pl:10): <envVar name="APPDIR" value="/usr/bin" +/> main::(test.pl:11): </wrapper> main::(test.pl:12): </config> main::(test.pl:13): XML main::(test.pl:14): ); DB<1> n main::(test.pl:15): my $wrapName = "testName 1.0.3"; DB<1> x $ref 0 HASH(0x1cb36d0) 'wrapper' => HASH(0x1cc3a10) 'app' => 'testApp.exe' 'envVar' => HASH(0x1cf4b20) 'APPDIR' => HASH(0x1cf4be0) 'value' => '/usr/bin' 'TMPDIR' => HASH(0x1ce6d34) 'value' => '/usr/tmp' 'name' => 'testName 1.0.3' 'script' => '/usr/people/ltorvalds/apps/wrapper.pl' DB<2>

No arrays there, just hashes.


In reply to Re: How do I correctly use arrays with XML::Simple? by EdwardG
in thread How do I correctly use arrays with XML::Simple? by ccarden

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.