#!/local/bin/perl # showdead.pl Daniel MacKay Daniel.MacKay@Dal.Ca # 990922 DEM Scan the log from a "htdig -s" run and produce pages listing # all the dead links for your web managers to browse. $prefix = "/local/www/search/deadlinks/" ; $title = "Dead links found on 990924 dig\n"; while (<>) { chop; #print "$_|\n"; s/\s*$//; if (m/^Not found:\s+(.*) Ref: (.*)$/) { ($bad,$ref) = ($1,$2) ; $key = $ref ; # print "$_\n" ; $key =~ s/^http:\/\///; $key =~ s/\/.*$//; push(@bad,"$key\t$ref\t$bad") ; } } ; open (SERV,">$prefix/index.html") || die "can't open dead index file" ; chmod (644,"$prefix/index.html"); print SERV "<