Sorry but I typed in lowercase http instead of upper case and now the script works!
Can you please (if anyone has the time) explain how it works?? I am really lost on the perl functions?
Also why do do some have
=> and some
->
[tt]
my $browser = LWP::UserAgent->new();
#WHAT IS new()
$browser->timeout(5);
#WHAT IS timeout(5)
open(HTMLPAGE,"</path/to/your/file.html"

or die "$!\n";
while (<HTMLPAGE>) { $buf .= $_; }
close HTMLPAGE;
while ($buf =~ /<a href="(.*?)">/gis) {
my $link = $1;
print "Checking $link.\n";
#WHAT IS THE new(GET => $link doing..is it fetching each link???
my $request = http::Request->new(GET => $link);
my $response = $browser->request($request);
#WHAT IS THIS WHOLE LINE DOING??
if ($response->is_error())
{ printf "%s\n", $response->status_line; }
#WHERE AND WHAT IS status line??
$contents = $response->content();
Please explain this whole line?
# check the link content as you like
# you may want to check differently from this
if ($contents =~ /Not Found|error|sorry| redirect|autoforward|frameset/ix)
{ print "Bad Link, $&\n$link.\n\n"; }
}[/tt]
Finally: Is it possible to run this once a day (like a cron job) except this is on an NT server???