use WWW::Mechanize qw(); # I hate 4 arguments LWP::UserAgent::credentials my $uri = 'urn:dslforum-org:service:DeviceConfig:1'; my $action = 'Reboot'; my $m = WWW::Mechanize->new(timeout => 5); $m->credentials($ENV{FRITZUSER} => $ENV{FRITZPW}); $m->add_header(SoapAction => "$uri#$action"); $m->post( "http://$ENV{FRITZIP}:49000/upnp/control/deviceconfig", content => <<"XML" XML );