# Post content to the supplied URL my $ua = new LWP::UserAgent; $ua->timeout( 3600 ); my $response = $ua->post( $url, Content_Type => 'multipart/form-data', Content => [ feedtype => $feedtype, datasource => $datasource, data => [ $xmlfile, $filename, Content_Type => $mimetype ] ] ); # Final error check throw Error::Simple( $response->message ) if( !$response->is_success ); print "Success"; } catch Error::Simple with { my $E = shift; print "ERROR: ", $E->text; } finally { print "\n"; };