Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Checking contents of fetched URL.

by holli (Monsignor)
on Jan 29, 2010 at 22:54 UTC ( #820419=note: print w/ replies, xml ) Need Help??

in reply to Checking contents of fetched URL.

The presence of ->content in your output should have given you a hint. The term $res->content does not get interpolated, only $res does.

You want: print "\nResponse = ", $res->content, " \n"; just as you did in the two lines above.


You can lead your users to water, but alas, you cannot drown them.

Comment on Re: Checking contents of fetched URL.
Select or Download Code
Replies are listed 'Best First'.
Re^2: Checking contents of fetched URL.
by ajay.awachar (Acolyte) on Jan 29, 2010 at 23:43 UTC

    I got your point on interpolation problem with $res->content. But even after replacing it with

     print "\nResponse = ", $res->content, " \n";

    I am still not getting the exact contents. I'm not getting any output for $res->content. I even tried  print "Response =  ".$res->as_string(); but it gives me some errors regarding unavailability of HTML/ Any idea on this.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-10-13 23:34 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (317 votes), past polls