ygcho_jason has asked for the wisdom of the Perl Monks concerning the following question:

Hello OK Thanks for replies

Replies are listed 'Best First'.
Re: LWP can't get page
by jettero (Monsignor) on May 10, 2007 at 13:05 UTC
    Does it say anything went wrong when you do this (taken from they synopsis of LWP::UserAgent)?
    if ($response->is_success) { print $response->content; # or whatever } else { die $response->status_line; }

    UPDATE: Wow. I'm reading through LWP::Parallel::UserAgent and I'm thinking that if you're not registering callbacks and things then you're probably looking for LWP::UserAgent or WWW::Mechanize instead.

    -Paul

Re: LWP can't get page
by Krambambuli (Curate) on May 10, 2007 at 13:15 UTC
    Your code works OK for me. That's what I have run:
    #!/usr/bin/perl use strict; use warnings; use LWP::Parallel::UserAgent; my $url = "http://www.ypbooks.co.kr/ypbooks/WebHome/specdm/specdm.jsp?p_isbn=194 +1700216"; my $ua = LWP::Parallel::UserAgent->new(); $ua->redirect (1); $ua->timeout (2); $ua->max_hosts (3); $ua->max_req (3); my $response = $ua->get( $url ); my $contents = $response->content; print $contents;