This basically is the LWP tutorial on CPAN... What's wrong with my system?
Thanks! Sincerely Pine > ______________________________________________ > From: Pine Yan > Sent: Thursday, November 17, 2005 6:04 PM > To: [email protected] > Subject: LWP package problem > > > I have the following code: > > #!/home/gnu/bin/perl > > use LWP; > > my $browser = LWP::UserAgent->new; > > my $url = 'http://www.google.com'; > > my $response = $browser->get($url); > die "Can't get $url -- ", $response->status_line unless > $response->is_success; > > print "Content: $response->content_type"; > print "--->\n$response->decoded_content"; > > It reports the following runtime error: > > Can't locate object method "get" via package "LWP::UserAgent" (perhaps > you forgot to load "LWP::UserAgent"?) at www.pl line 9. > > What's wrong here? My LWP version is 5.69, perl 5.6.1 > > > Sincerely > Pine >
