Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: perl lwp

by kcott (Archbishop)
on Feb 07, 2012 at 11:45 UTC ( [id://952254]=note: print w/replies, xml ) Need Help??


in reply to perl lwp

Your code is fine; the problem is with the URL. In general, when testing this sort of code, check the validity of the URL before assuming a problem with your Perl code. What do you get when you plug that URL into a browser?

Removing the "1" (i.e. my $url='http://www.google.com/';) gives:

New url :http://www.google.com/ Response Headers: Cache-Control: private, max-age=0 Date: Tue, 07 Feb 2012 11:20:59 GMT Server: gws Content-Type: text/html; charset=ISO-8859-1 ...

If you think the URL you provided should be valid, contact Google for a reason why it's not available.

-- Ken

Replies are listed 'Best First'.
Re^2: perl lwp
by perl_sakthe (Initiate) on Feb 08, 2012 at 05:21 UTC
    Hi, thanks for the reply.. I am able to get the contents of our application url.. For the current requirement I need to get the xml content from an external url.. from my perl script, I am not able to get any other url's content...should i check any firewall or proxy.. when i run the perl script for any other url , i am getting the result as, HTTP/0.9 200 (OK) EOF Client-Date: Wed, 08 Feb 2012 05:13:58 GMT Client-Peer: 66.39.54.27:80 Client-Response-Num: 1 Can you please suggest..

      Your code works when I run it and I can access external content so I can't reproduce your problem. I suggest you check with your local system/network administrators or whoever manages such tasks.

      -- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://952254]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-23 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found