ウェブページの取得

perlウェブページの取得

use strict;
use warnings;
use LWP::UserAgent;

my $url = "http://www.yahoo.co.jp";
my $ua = LWP::UserAgent->new;
$ua->agent('Mozilla');
my $res = $ua->get($url);
my $content = $res->content;

print($content."\n");