Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem using LWP

Status
Not open for further replies.

spookie

Programmer
May 30, 2001
655
IN
Hi,
I am trying to make http request to another server and read a web page from inside perl.
Here is the code i am using
Code:
my $url = "[URL unfurl="true"]http://www.<somesite>.com"[/URL] ;
use LWP::Simple;
my $content = get $url;
die "Couldn't get $url" unless defined $content;

print $content ;

I am not able to get the content.(i.e.Couldn't get Am i missing something or is it a credentials issue?

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Straight from the LWP::Simple pod.
You will not be able to examine the response code or response headers (like 'Content-Type') when you are accessing the web using this function. If you need that information you should use the full OO interface (see LWP::UserAgent).

M. Brooks
 
No i don't..:))
Yes and the website exists..

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top