my $bandwidth = $xml->{exec_command}->{xml_show_result}->{xml_show_resource_usage}->{ru_entry}->{bandwidth}->{ru_current}; #### my $bandwidth = $xml->{exec_command}->{xml_show_result}->{xml_show_resource_usage}->{ru_entry}->{'bandwidth '}->{ru_current}; #### my $xml = XMLin($tmpfile, ForceArray => 0, SuppressEmpty => 1, KeyAttr => 'ru_resource', NormaliseSpace => 1 );