in reply to Issue with using XML::Simple

As your Data::Dumper output shows, there is significant whitespace after "bandwidth". One way to get it to work (and eliminate the warning) is to change:
my $bandwidth = $xml->{exec_command}->{xml_show_result}->{xml_show_re +source_usage}->{ru_entry}->{bandwidth}->{ru_current};
to:
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

    Works as expected now. I appreciate the help!