#! /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");