Tried the following but it doesn't save to file, how should I do that?
my $conf = "/home/ember/devices/$Macaddress/$Macaddress.xml";
# create object
my $xml = XMLin ($conf, KeepRoot=>1,);
# insert element
$xml->{dut}{ipaddress} = "$ipaddress";
$xml->{dut}{macaddress} = "$Macaddress";
$xml->{dut}{model} = "$ProdShortName";
$xml->{dut}{frimware} = "$Firmware_Version";
# convert Perl array ref into XML document
print XMLout($xml);
|