itrik0487 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I am using the following code to find the parse the Apache webserver server status url. It is using the IPv6 address to build the URL. But when I am trying to run the program I am getting the error:
"500 Can't connect to localhost:80 (Connection Refused) at ./sample.pl line 19"
Code that I am using is as following:
#!/root/localperl/bin/perl use strict; use Warnings; use utf8; use LWP::UserAgent; use Data::Dumper; our $URL="http://localhost"; my $ua = LWP::UserAgent->new; my $res = $ua->get($URL); if($res->is_success) { print $res->decoded-content; } else { die $res->status-line; }
|
---|
Back to
Seekers of Perl Wisdom