Adding,

use Data::Dumper; print Dumper $config;
to the end of your code reveals that the 'WR80B' key's value contains a hash ref whose only key is 'Runable'. You probably wanted,
print $config->{WhicsService}{Parameters}{Service}{Runable}{Value} . " +\n";
Actually, the 'WR80B' key doesn't exist at all until the print autovivifies it. Printing Dumper($config) before the other print statements shows the structure as XML::Simple constructs it.

Does your top level tag need to be <WHICS>? That will stand on the way of more sophisticated parsing, having the same tag with a different use for data.

The parent XML::Parser module gives a data structure which distinguishes between attributes and elements. It also places elements in an array, preserving their order. The simple version is probably good enough for what you're doing with configurations.

After Compline,
Zaxo


In reply to Re: Problem using module XML::Simple by Zaxo
in thread Problem using module XML::Simple by adam_2005

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.