in reply to Issue with using XML::Simple
to:my $bandwidth = $xml->{exec_command}->{xml_show_result}->{xml_show_re +source_usage}->{ru_entry}->{bandwidth}->{ru_current};
my $bandwidth = $xml->{exec_command}->{xml_show_result}->{xml_show_re +source_usage}->{ru_entry}->{'bandwidth '}->{ru_current};
Update: But a better way (after searching the POD for "space") is to use NormaliseSpace:
my $xml = XMLin($tmpfile, ForceArray => 0, SuppressEmpty => 1, KeyAttr + => 'ru_resource', NormaliseSpace => 1 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Issue with using XML::Simple
by spawned345 (Initiate) on Jul 07, 2011 at 17:21 UTC |