Help for this page

Select Code to Download


  1. or download this
    use LWP::Simple;
      my $url = 'http://site.com/file.html';
        print "Getting\n";
      my $content = get $url;
        print "Done\n";
    
  2. or download this
    Getting
    Done
    Getting
    Hang
    
  3. or download this
    use LWP::UserAgent;
    use LWP;
    ...
    $ua->agent($ident);        # set the id
    $ua->timeout($timeout);    # timeout
    my $req = new HTTP::Request GET => 'http://site.com';