use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; print "Sending request...\n"; my $res = $ua->post('http://127.0.0.1:2112', [ 'q' => 'blah', 'pg' => 'q', 'avkw' => 'tgz', 'kl' => 'XX', ] ); print "Got response\n"; if ($res->is_success) { print "Content: ".$res->as_string."\n"; } else { die "ERROR: ".$res->status_line; }