use LWP::UserAgent; use HTTP::Request::Common; use URI; sub CreatePriorityAccount{ my $query = shift; my $url = new URI(); $url->scheme( 'http' ); $url->host( getLotusServer() ); $url->path_query( LOTUSPRIPATH ); my $res = $ua->request(POST $url, content-type => 'form-data', content => $query, authorization => "Basic " . AUTHORISATION, ); # Get the Notes DocID from the response if ($res->is_success) { my ( $DocID ) = $res->content =~ /The DocID for this event is ([0-9A-F]*)/; LOG "SUCCESS: $name, Doc ID is $DocID"; StoreDocID( $name, $DocID ); } else{ LOG "FAILED: POST $url"; LOG "RESPONSE: ", $res->code, ": ", $res->message; } }