# Generate the code that sets the title attribute in an anchor. The generated
# file is included into the index.htm file.
#
# For example:
# perl genanchr.pl software.htm
#
# Generates the file software.inc
#
#------------------------------------------------------------------------------
require 5.004;
use English;
my $in_file;
my $title;
my @fields;
$in_file = $ARGV[0];
@fields = split(/\./, $in_file);
open (OUT, ">$fields[0].inc");
print OUT "title=\"";
$nl=0;
while(<>) {
chop;
if (/\<H3\>/i) {
if ($nl == 1) {
print OUT "\n";
}
@fields = split(/\"/, $_);
$title = $fields[1];
print OUT "
$title";
$nl = 1;
}
}
print OUT "
\"\n";
close(OUT);
Back to The Information Cave home page
Last modified Mon Apr 26 20:44:34 1999.