perl如何得到源代码
#!/usr/bin/perl use warnings; use strict; use Win32::OLE; my $url="www.163.com"; my $ie = Win32::OLE->new ('InternetExplorer.Application.1', 'Quit') || die "CreateObject: " . Win32::OLE->LastError ; $ie->{Visible} = 1; #0 $ie->Navigate($url); ???????? undef($ie);
use LWP::Simple; use LWP::UserAgent; use HTTP::Request::Common; use Socket; my $ua = new LWP::UserAgent; $ua->agent("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1"); my $req = new HTTP::Request GET =>$url; my $res = $ua->request($req); my $content = $res->content;