Help for this page

Select Code to Download


  1. or download this
     my @links = ();
    sub callback {
    ...
      $res = $ua->request(HTTP::Request->new(GET => $url),
                          sub {$p->parse($_[0])});
    
  2. or download this
    $ua = LWP::UserAgent->new;
    $req = HTTP::Request->new(GET => $url);
    $req->authorization_basic('user', 'pass');
    $res = $ua->request($req)->as_string,
    
  3. or download this
    $ua = LWP::UserAgent->new;
    $req = HTTP::Request->new(GET => $url);
    $req->authorization_basic('user', 'pass');
     $res = $ua->request($req)->as_string,
                sub {$p->parse($_[0])};