Hello all
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);
&get_response($response);
#the sub
sub get_response {
my $ res = shift;
print $res->status_line;
}


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

what im doing wrong here ?
thanks

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


Reply via email to