#!/usr/bin/perl
use CGI qw(:standard);



# MY REFERENCE:  http://www.cgi101.com/book/ch1/text.html

open(FILE, ">project3_final.html") ;

#print FILE header;
print FILE start_html(-title=>"Project 3");

print FILE <<EOF
<h3>Project 3: Final Results</h3><P>
EOF

;

opendir(DIR, ".");

# \. is "."
@imgfileList = grep (/\.png$/,readdir(DIR));
@readmefileList =glob ("*README*");

foreach $readme (@readmefileList){
print FILE <<EOF
<a href="$readme">$readme</a><p>
EOF
}


foreach $ImgFile (@imgfileList){
print FILE <<EOF 
<img WIDTH=80% src= "$ImgFile"> $ImgFile <p> 
EOF
}


print FILE end_html;

close(FILE);
