Hi all,

 I have a script that goes out and "grabs"
a specific HTML page. I then search through
the page, gathering the info I want.
 Sometimes, the site I'm hitting is either
bogged down or unresponsive. I'd like to
include a timing mechanism that basically
says after 10 secs, quit trying to get
the page and move on.
 Some sample code:


 my $url = "http://$host:$port/page";;
 my $ua = LWP::UserAgent->new();
 $ua->agent("Godzilla/v911 Mithril");
 my $req = HTTP::Request->new(GET =>$url);

 $req->referer("http://nowhere.com";);

Loop until you reach 10 seconds {

 my $response = $ua->request($req);
 my $content = $response->content();

}

-- 
Ken Hammer
Strategic Projects And Planning
University Of Michigan

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to