#!/usr/bin/perl -w
sub Get_Title {
my =shift;
unless(-f "") { return("NO INDEX"); }
open(HTML,"<");
while(){
if(sh=~ /
(.*)<\/title>/i) {
close HTML;
return "";
}
}
close HTML;
return "Untitled";
}
my ="/usr/local/apache/htdocs/projects/";
my ="http://mattwork.potsdam.edu/projects/";
opendir(PRJD,"");
my @dirs=readdir PRJD;
closedir(PRJD);
print "Content-Type: text/html\n\n";
print "Project Index Page\n";
for(@dirs) {
if(sh=~ /^\./) { next; }
unless(-d sh) { next; }
my ="sh/index.html";
my =Get_Title("");
=~ s///i;
print "\n";
}