#!/usr/bin/perl -w sub Get_Title { my $file = shift; unless(-f $file) { return("NO INDEX"); } local *HTML; local *_; open(HTML,"<$file"); while(){ if(/(.*)<\/title>/i) { return $1; } } return "Untitled"; } my $dir ="/usr/local/apache/htdocs/projects"; my $url ="http://mattwork.potsdam.edu/projects"; opendir(PRJD, $dir); my @dirs = readdir PRJD; closedir(PRJD); print "Content-Type: text/html\n\n"; print "<html><head><title>Project Index Page\n"; print "

Project Index Page

\n"; print "";