#!/usr/bin/perl # create a new browser use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->cookie_jar(HTTP::Cookies->new()); #### sub GETURL { $start_time = time; $output_buffer = ""; print OUTDATA "Retrieving $_\n"; if ($mech->get("$_")) { $_ = $mech->content(); $time = time-$start_time; print OUTDATA "Seconds $time\n"; while (s/\n\n/\n/) {} } else { print OUTDATA " ERROR\n";} sleep (1); }