I wanted to download some online data from some site so i used perl LWP module.
code i wrote was like this:
Expand|Select|Wrap|Line Numbers
- use LWP;
- use LWP::UserAgent;
- $ua=new LWP::UserAgent;
- $ua->proxy(['http','ftp'],'http://group:guest@proxy.ibab.ac.in:3128');
- open(FH,">datafile.txt");
- chmod 0777,"datafile.txt";
- $url="http://xyz.com";
- sleep(5);
- $response=$ua->get($url);
- $result=$response->content;
- print FH $result
- close FH;
Is there any other method which can reduce the time taken to get the data?
I tried fcgi but no improvements!!
Is LWP module itself is slow??
Any suggestions?
with regards
Archana