# Using (my own) Future::HTTP, which provides an AnyEvent::HTTP-like API my $ua = Future::HTTP->new(); # Fire off all requests at once, rate limiting etc. is left as an exercise my @outstanding; for my $url (@requests) { my $res = $ua->http_get($url)->then(sub { my( $body, $data ) = @_; # ... handle the response return $body }); push @outstanding, $res; }; while( @outstanding ) { my $body = (shift @outstanding)->get; ... }; #### my $crawler = COWS::Crawler->new(); $crawler->submit_request({ method => 'GET', url => $url, info => { url => $url }} ); while( my ($page) = $crawler->next_page ) { my $body = $page->{res}->body; my $url = $page->{req}->req->url; ... };