#!/usr/bin/perl sub getlinks { if (open(IN,'); close IN; } else { $list="[ List is momentarily unavailable. ]"; return 0; } $i=1; $n=$#urls; $outfile=''; for ($k=$n; $k>=0; $k--) { $line=$urls[$k]; ($url,$title)=split(/\s+/,$line,2); $url=~/^http:\/\/([\w\.\-]*)/; $dom=$1; next if ($url=~/\=/); next if ($url=~/3pc\w*\.htm/); next if ($url=~/\.cgi$/); $title=$dom unless $title; $title=$dom if $title=~/\=/; next if ($seen{$dom}||$seen{$title}); $title=~s/\s/ /g; $seen{$dom}=1; $seen{$title}=1; $list.="
  • $title\n"; $outfile="$line\n".$outfile; $i++; last if ($i>100); } } sub showlinks { if (open(IN,'; close IN; } foreach $line (@page) { $line=~s/\?\?\?list/$list/; print $line; } } sub putlinks { if (open(OUT,'>links.x')) { print OUT $outfile; close OUT; } } print "Content-type: text/html\n\n"; &getlinks; &showlinks; &putlinks; 1;