(my $id, $first{$name}, $second{$name}) = split /,/;
####
open ( my $input_1, '<', 'output1.csv' ) or die $!;
while ( <$input_1> ) {
chomp;
my ($name_1, $ip_1) = split /,/;
my $xml = XML::Twig -> new -> parsefile ( 'example.xml' );
$xml ->set_pretty_print('indented_a');
open ( my $input_2, '<', 'output2.csv' ) or die $!;
while ( <$input_2> ) {
chomp;
(my $id, $first{$name}, $second{$name}) = split /,/;
$xml -> root -> set_att('name', $name_1);
$xml -> get_xpath('//ipaddress',0) -> set_text($ip_1);
my $uri="https://hostname:9060/ers/config/networkdevice/$id";
my $req = HTTP::Request->new('PUT', $uri,
[Accept=>'application/vnd.com.cisco.ise.network.networkdevice.1.1+xml',
Content_Type=>'application/vnd.com.cisco.ise.network.networkdevice.1.1+xml; charset=utf-8'], $xml->sprint);
$req->content($xml->sprint);
$req->authorization_basic("user", "user");
##
##
UPDATE need be done for 10.56.7.80
200 OK
400 Bad Request
Use of uninitialized value $id in concatenation (.) or string at My_File line 65, <$_[...]> line 3.
405 Method Not Allowed
Use of uninitialized value $id in concatenation (.) or string at My_File line 65, <$_[...]> line 4.
405 Method Not Allowed
400 Bad Request
##
##
Line 65: my $uri="https://10.66.1.16:9060/ers/config/networkdevice/$id";