use strict ; use warnings ; #### my $xml = XML::Twig->new()->parsefile('example.xml') ; $xml-> ... ; $xml -> get_xpath('//ipaddress',0) -> set_text("") ; #### my $uri="https://hostname:9060/ers/config/networkdevice/"; my $req = HTTP::Request->new( ... $req->content($xml->sprint) ; # Strange, why is there another $xml->sprint here? $req->... #### my $res = $ua->request( $req ) ; # Check the outcome of the response if ($res->is_success) { print $res->status_line, "\n"; } else { print $res->status_line, "\n"; }