my $ua = LWP::UserAgent->new; $ua->timeout( 600 ); my $reqobj = $ua->post( 'http://somewebsite/page.cgi', { Var1 => $value1, Var2 => $value2, Submit => 'Process query', } ); if( ${$reqobj}{_msg} ne 'OK' ) { print "\nerror posting data: ${$reqobj}{_msg}\n"; return 1; } my $results = ${ $reqobj }{_content};