in reply to How to test for the fastest server to download from?

s/Needed/Wanted/.

Try using a Stopwatch to time an LWP::Simple::get()

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

  • Comment on Re: HelpNeeded!!! How to test for the fastest server to download from?
  • Download Code

Replies are listed 'Best First'.
Re: HelpNeeded!!! How to test for the fastest server to download from?
by hacker (Priest) on Dec 21, 2001 at 16:05 UTC
    You probably want to use HEAD, not GET. Something like:
    $ua = LWP::UserAgent->new; $request = HTTP::Request->new(HEAD => "$url"); $response = $ua->request($request); $status_line = $response->status_line;
    Using 'GET' on a large page will not really be a good determining factor of response time, but using HEAD will.