簡單print網頁源代碼

#! /usr/bin/perl
use strict;
use warnings;

use LWP::Simple qw(get);
my $html = get("http://www.baidu.com");
print $html;


把網頁源代碼保存到本地:html

#! /usr/bin/perl
use strict;
use warnings;

use LWP::Simple qw(getstore);
getstore("http://www.xys.com", "bdSource.html");
相關文章
相關標籤/搜索