... while (my $ref = $sth->fetchrow_hashref) { $pua->register( HTTP::Request->new(GET => $ref->{'url_en'}) ); } my @results = $pua->wait(); for (@results) { my $res = $_->response; ... } ...