The next subroutine:
sub check_link { my $url = $_[0]; my $realm = 'Privacy Guard'; my $user = 'Admin'; my $pass = '********'; $url =~ s/http:\/\///; $url = $url.':80'; my $ua = LWP::UserAgent->new; $ua->credentials( $url, $realm, $user, $pass ); my $res = $ua->head($url); if ($res->is_error) { return $res->status_line; } else { return $url; } }
gives a: "400 URL must be absolute" error.
if (!$res->is_error) {
gives: 88.159.57.235/roots/lines/wielinga/wie-aaa/wie-sle/wie-hee/wie-bru/index.htm:80
What goes wrong?
In reply to 400 URL must be absolute by Wijnand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |