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/


Reply via email to