Help for this page

Select Code to Download


  1. or download this
    my $username = "someuser";
    my $password = "password";
    ...
    $req = HTTP::Request->new(GET => $url);
    $req->authorization_basic($username,$password);
    print $ua->request($req)->as_string;
    
  2. or download this
    ## LWP!
    use LWP;
    ...
    my $response=$browser->get($url);
    
    print $response->content();
    
  3. or download this
    ## WWW::Mechanize
    #!/usr/bin/perl
    ...
    $mechanize->get($url);
    # Retrieve the desired page
    print $mechanize->content();