in reply to Async HTTP Request

You start the get request asynchronouslyand then fall off the end of the script before it has completed,hence the error.

Try waiting for the response:

use HTTP::Async; use HTTP::Request; my $async = HTTP::Async->new; $async->add( HTTP::Request->new( GET => 'http://www.perl.org/' ) ); my $response = $async->wait_for_next_response;

Of course, unless you add several gets, that is the same as doing a synchronous get, but it will 'fix' the error.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.