use strict; use LWP::UserAgent; my $ua = LWP::UserAgent->new; #my $req = HTTP::Request->new(GET => 'http://search.cpan.org/CPAN/auth +ors/id/G/GA/GAAS/libwww-perl-5.836.tar.gz'); my $req = HTTP::Request->new(GET => 'http://usename:password@host/path +/to/file.zip'); my $res = $ua->request($req); if ($res->is_success) { # here put what you want to do with the file # print $res->content; # or # open( my $file, '> file.zip'); # print $file $res->content; # close($file); } else { print STDERR $res->status_line; }
In reply to Re: download ZIP file from web
by bluescreen
in thread download ZIP file from web
by tale103108
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |