Thanks for the advice about using parsers. I'll look into them once I've got this problem fixed. The xml is output from another program I wrote a while ago, so I understand what should be there. As for my current problem, when I run code, the Perl interpreter points to the first print line you had, and says: Not a HASH reference ... I went here with the debugger, and saw this
x $self 0 POSwitch=HASH(0x1bc4c8) 'Id' => 'tp_incoming.vsd.10.Switch' 'Object' => 'Mailbox.gender' 'poName' => 'POSwitch' 'valuePair' => ARRAY(0x1a7b94) 0 SCALAR(0xc79d8) -> HASH(0xc7984) 'targetPo' => 'ERROR000' 'value' => 'xdefault' 1 SCALAR(0xc7a5c) -> HASH(0xc79e4) 'targetPo' => 'tp_incoming.vsd.10.Menu' 'value' => 'Mailbox.GENDER_MALE' 2 SCALAR(0xc7a8c) -> HASH(0xc7a68) 'targetPo' => 'tp_incoming.vsd.10.Menu.9' 'value' => 'Mailbox.GENDER_FEMALE'
and
DB<4> x $entry 0 SCALAR(0xc79d8) -> HASH(0xc7984) 'targetPo' => 'ERROR000' 'value' => 'xdefault'
It's almost, but not quite there! ...regan

In reply to Re: Re: HoAoH by regan
in thread hashes, arrays, and references... oh my by regan

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.