Help for this page

Select Code to Download


  1. or download this
     use Net::HTTP;
     my $s = Net::HTTP->new(Host => "www.perl.com") || die $@;
     $s->write_request(GET => "/", 'User-Agent' => "Mozilla/5.0");
    ...
        last unless $n;
        print $buf;
     }
    
  2. or download this
    use WWW::Mechanize;
    my $ua=WWW::Mechanize->new();
    $ua->get($url);
    $ua->save_content('filename.html') if $ua->success();