You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
289 B
Perl
14 lines
289 B
Perl
5 years ago
|
use LWP::UserAgent;
|
||
|
|
||
|
$user_agent = new LWP::UserAgent;
|
||
|
|
||
|
$request = new HTTP::Request('GET',
|
||
|
'http://www.cpan.org/doc/FAQs/index.html');
|
||
|
|
||
|
$response = $user_agent->request($request);
|
||
|
|
||
|
open FILEHANDLE, ">file.txt";
|
||
|
|
||
|
print FILEHANDLE $response->{_content};
|
||
|
|
||
|
close FILEHANDLE;
|