I am getting following error when i check the link ttps://agency.octopi.org/octopidataentry/login/login1.aspx. The error is Can't call method "request" on an undefined value at /space/home/local/iw-home/iw-perl/lib/perl5/site_perl/5.005/LWP/UserAgent.pm line 227.
Code
my $link = qq(
https://agency.octopi.org/octopidataentry/login/login1.aspx);
my $ua = new LWP::UserAgent;
$ua->timeout('10');
print "1\n";
my $request = new HTTP::Request 'POST', $link;
print "2\n";
my $response = $ua->request($request);
print "3\n";
$code = $response->code;
print "\nCode is $code\n";
$str = $response->as_string();
print "\nstring is $str\n";
if (!($response->is_success) )
{
print "Yes\n";
}
TIA
MM Guptha
TS5.0.1 on Solaris