majo has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone. I need some help regarding the code below. I would like to save the latency results into a file whenever a measurement is carried out. Furthermore I would to add a progress bar when the measurements being done. Thank your for your continued support.
#!/usr//bin/perl -w use LWP::UserAgent; use Time::HiRes 'time','sleep'; $ua = LWP::UserAgent->new; $request = new HTTP::Request('GET', "http://http://www.computerhope.co +m/file.com"); $start = time( ); $response = $ua->request($request); $end = time( ); $latency = $end - $start; print length($response->as_string( )), " bytes received in $latency s +econds\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SAVE DATA
by Corion (Patriarch) on May 07, 2012 at 07:37 UTC | |
|
Re: SAVE DATA
by zentara (Cardinal) on May 07, 2012 at 11:07 UTC |