develooper Front page | perl.libwww | Postings from January 2002

Need Help On Using LWP::Simple

Thread Next
Weifeng Wang
January 23, 2002 11:15
Need Help On Using LWP::Simple
Message ID:
Hi There,

Thank you very much for all the responses on my previous question on
installation of libwww module.  It looks like that it is hard to compile a
module without cc compiler when the original Perl was built with cc.  So, I
installed the libwww module on my Linux machine instead of Solaris server.
But, when I used the following Perl script I got the empty, i.e. 0 byte,
files downloaded.  I am wondering whether my Perl script is wrong since I
can manually download the files through web pages.  I would appreciate if
someone can give me a help.  Thank you very much in advance.

Weifeng Wang
Bio-Informatics Group, Inc.
2000 Regency Parkway, Suite 395
Cary, NC 27511
Tel: (919)380-1862

use LWP::Simple;
foreach $CM (@CMS)
 if (($CM < 10) & ($CM > 0)){$CM1="0".$CM} else {$CM1=$CM};
 $URL1 =
 $filename1 ="\/home\/share\/hs_chr".$CM."\.gbs\.gz";
 open (out1, ">$filename1") or die;
 print ("$URL1\n");
 getstore ($URL1, $filename1);

 $URL2 =
 $filename2 ="\/home\/share\/hs_chr".$CM."\.fa\.gz";
 open (out2, ">$filename2") or die;
 print ("$URL2\n");
 getstore ($URL2, $filename2);

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About