Forum Moderators: coopster & phranque

Message Too Old, No Replies

spider script grabs web page

but leaves me weird message

         

jeremy goodrich

4:45 pm on Jul 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The perl script grabs the web page okay, but when I try to print the page, all the script prints is this:

HTTP::Response=HASH(0x82af7b4)

My print declaration in the script is written like this:

print "$curdoc";

So there isn't a problem there...is this something to do with the whole "unpack hexadecimal" or something like that? I have seen this in scripts before just never used it. Do I need to decode the page to have it in ANSI form?

sugarkane

7:59 pm on Jul 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTTP::Response returns a reference to a hash containing information about the server's response - eg status code, content etc.

To actually get to the page's content, you need to use the content() method:

$content=$response->content();

where $response is the variable you used to make the request