In a Perl script (with Ubuntu) I'd like to do something like
use Blah;
...
...
my $response =
&Blah::Fetch($URL, {'method'=>'POST', 'parameters' => \%params});
which I've written for convenience to look a lot like a Prototype.js ajax call, but obviously we're using Perl not Javascript, we're on a server not a browser, and the caller wants to block until we get an answer or timeout back from the remote server. In case of a server or timeout error, defined($response) should be false. If there's a way to fetch HTTP status that's nice, but it is enough to know the request failed. It should be able to do either GET or POST.
I know I can do this by using system and wget, but that's a kludge.
What is the best way to do this task in Perl?
Is there a Perl interface that is nice and tidy?