to all,
thanks for your prompt replies.
You guys are great!
Anjan

On Wed, Apr 8, 2009 at 4:29 PM, Gunnar Hjalmarsson <nore...@gunnar.cc>wrote:

> Telemachus wrote:
>
>> On Wed Apr 08 2009 @  3:22, ANJAN PURKAYASTHA wrote:
>>
>>>  I have a  file stored at a location: http://parent_dir/file
>>> Which among gazillion LWP options can I use to download and store the
>>> file
>>> on my machine?
>>>
>>
>> If you just want to grab the file, you can use LWP::Simple to grab it:
>>
>> use LWP::Simple;
>>
>> my $url = 'http://parent_dir/file';
>> my $local = '/path/to/local/file';
>> my $file = getstore($url, $local);
>>
>
> getstore() returns the HTTP status code, so 'file' is not the most
> appropriate name of a variable to which the return value is assigned.
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>


-- 
=============================
anjan purkayastha, phd
bioinformatics analyst
whitehead institute for biomedical research
nine cambridge center
cambridge, ma 02142

purkayas [at] wi [dot] mit [dot] edu
703.740.6939

Reply via email to