use Mojo::UserAgent; use Mojo::IOLoop; my @url = qw( http://perlmonks.org http://example.com ); my $ua = Mojo::UserAgent->new; $ua->get( $_ => sub { my( $ua, $tx ) = @_; print "'", $tx->req->url, "' => '", $tx->res->text, "'\n"; } ) foreach @url; Mojo::IOLoop->start unless Mojo::IOLoop->is_running;