Meir Yanovich wrote:
Hello all

Hello,

in new to perl .
i know how to pass simple variables to perl subs
but now i like to pass HTTP::Response variable to sub
and im getting errors here is my example :

my $browser = LWP::UserAgent->new();
my $response = $browser->get($url);

$response now contains the data from the web site at $url. It is *NOT* an object but an HTML page.

&get_response($response);
#the sub
sub get_response {
my $ res = shift;
print $res->status_line;

You are trying to use the HTML data as an object here which makes no sense.

}


the error im getting is :
Can't call method "status_line" on unblessed reference at


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to