I was looking for a link checker integrated as tool on my website. I found checklinks from Jim Weirich ( https://www.linuxjournal.com/article/2026 and want to use it as fundament for my application. The problem where some syntax errors but only one I don't understand:
# ScanUrl
# ------------------------------
# We have a URL that needs to be
# scanned for further references to
# other URLs. We create a request to
# fetch the document and give that
# request to the UserAgent responsible
# for doing the fetch.
sub ScanUrl {
my($url) = @_;
$currentUrl = $url;
push (@isScanned, $url);
print "Scanning $url\n";
$request = new HTTP::Request (GET => $url);
$response = $agent->request ($request, \&HandleDocChunk);
# if ($response-7gt;is_error) {
# die "Can't Fetch URL $url\n";
# }
$parser->eof;
}
I comment it out here what was giving the error:
syntax error at checklinks.pl line 131, near "gt;"
Not enough arguments for HTTP::Status::is_error at checklinks.pl line 131, near "is_error) "
syntax error at checklinks.pl line 135, near "}"
Can't use global @_ in "my" at checklinks.pl line 153, near "= @_"
syntax error at checklinks.pl line 163, near "}"
Execution of checklinks.pl aborted due to compilation errors.
Can somebody help me???
Thanks and regards...