in reply to XML::Simple add
Due to ForceArray=>1 the $xml->{'dut'} is an ARRAY ref, not a HASH ref! Therefore you should treat it as an array ref:
Try to print the $xml with Data::Dumper before you attemptto modify it to see how does the datastructure actually look.push @{$xml->{dut}}, { ipaddress => $ipaddress, macaddress => $Macaddress, model => $ProdShortName, frimware => $Firmware_Version, # I think you mean firmware, not frim +ware };
|
|---|