#set parameters $delim = "::"; #delimiter between fields # read the bib file and pack it into an array open (bibfile, $bibFilename); $line = 1; $author = ""; while ($line) { $line = ; # read a line if ($line ne "\n") { chop $line; } # author if ($line =~ /\%A/) { # concat authors if (length($author)) { $author = $author.", ".substr($line, 3); } else { $author = substr($line, 3); } } # title if ($line =~ /\%T/) { $title = substr($line, 3); } # TR number if ($line =~ /\%R/) { $trNumber = substr($line, 3); } # URL if ($line =~ /\%U/) { $URL = substr($line, 3); } # Date if ($line =~ /\%D/) { $date = substr($line, 3); } # pack it up and save it as a string if ($line eq "\n") { push (@records, "$trNumber$delim$author$delim$title$delim$date$delim$URL"); $author = ""; $title = ""; $trNumber = ""; $date = ""; $URL = ""; } } close (bibFile); # print header to the html file open (outfile, ">".$outFilename); print outfile "", $siteTitle,"\n"; print outfile "

Technical Reports at ", $siteTitle, "

\n"; # sort the records by trnumber @records = reverse (sort @records); # print them html formatted. print outfile "
\n"; foreach $record (@records) { ($trNumber, $author, $title, $date, $URL) = split (/$delim/, $record); if (length($URL)) { print outfile "
"; print outfile $trNumber, "\n"; } else { print outfile "
", $trNumber, " (Not available on-line)\n"; } print outfile "
", $author, ",\n", $title, ",\n", $date, ".\n"; } print outfile "
\n"; # remote sites too print outfile "

Browse some other sites with technical reports

\n"; print outfile "
\n"; print outfile "
Check other sites\n"; print outfile "
\n"; close (outfile);