The element you're looking for isn't where you think it is. Use Data::Dumper (or a similar module) to help visualize the parsed data structure.
Your script and XML::Simple is parsing your data into this structure (viewed using Data::Dumper):
$VAR1 = { 'WhicsService' => { 'Parameters' => { 'Service' => { 'Server +sMin' => { + 'Detail' => 'Minimu m number of servers running on WHICS', + 'Value' => '7' + }, 'comman +d' => { + 'Detail' => 'Unix comm and required to run WR81B', + 'Value' => 'cd /whics/ ahm && ./bin/wh_wweb80.sh ' + }, 'PortOu +t' => { + 'Detail' => 'Default p ort for Unix server connections', + 'Value' => '4100' + }, 'Name' +=> 'WR80B', 'WR80B' + => { + 'Runable' => {} + }, 'Runabl +e' => { + 'Detail' => 'Run WR80B process if value is yes else does not stat WR80B', + 'Value' => 'yes' + } }, 'ServersMax' => { 'Det +ail' => 'Maximum number of ser vers running on WHICS', 'Val +ue' => '15' }, 'WHICS' => { 'Detail' +=> 'Name of Unix system runnin g WHICS', 'Value' = +> '123.456.7.89' } } } };
(note that you can eliminate the dereferencing arrows (->) between the hash elements, as documented in perlref).$config->{WhicsService}{Parameters}{Service}{Runable}{Value}
For more information about displaying complex data structures, see Re: How can I visualize my complex data structure?.
Update: added a couple links - thanks planetscape
In reply to Re: Problem using module XML::Simple
by bobf
in thread Problem using module XML::Simple
by adam_2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |