Help for this page

Select Code to Download


  1. or download this
    print LWP::UserAgent->new()->
            request(
                    HTTP::Request->new(GET => 'http://geeksalad.org')
                    )->content;
    
  2. or download this
    if (($_=LWP::UserAgent->new()->
        request(
    ...
                ))->is_success) {
            print $_->content;
    }
    
  3. or download this
    # Create a user agent object
    use LWP::UserAgent;
    ...
    } else {
        print "Bad luck this time\n";
    }