# creation of the xml doc snipped # create the user agent $agent = new LWP::UserAgent or die "Unable to create HTTP Agent"; $agent->agent($AGENT); # if encoding is set -- client in this case wants no encoding if ($encode eq "T") { $response = $agent->request(POST $url,[xml=>$xml],content_type=>'application/x-www-form-urlencoded'); } else { # create a request $request = new HTTP::Request POST=>$url; $request->content_type('text/xml'); $request->content($xml); # send $response = $agent->request($request); } if ($response->is_success) { print $gl_logout "$certno: send to $url successful\n"; undef $agent; return 0; } print $gl_logout "$certno: send to $url failed\n"; print $gl_logout "$certno: Remote said: ",$response->status_line,"\n"; undef $agent; return 1; }