use strict; use warnings; use LWP; use Benchmark::Stopwatch; my $url = 'http://hermes/datasquid/static.dbm'; my $stopwatch = Benchmark::Stopwatch->new->start; my $ua = LWP::UserAgent->new; $stopwatch->lap('Instantiate Useragent'); my $response = $ua->get( $url ); $stopwatch->lap('Download file'); if($response->is_success) { print "Downloaded succeeded\n"; } else { print "Download failed\n"; } print $stopwatch->stop->summary;