[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] Creating an index page



I modifying a script which makes an index page to show whats in 
that directory.
At the moment it only shows .html documents, I want it to show 
gifs and jpgs and create a link to each one in the html...
heres the script....  thanks in advance.

opendir(DIR, ".");
@htmlFiles = grep(/\.html$/,readdir(DIR));
closedir(DIR);

print "<HTML>\n";
print "<BODY>\n";
print "<UL>\n";

foreach $file (@htmlFiles) {
   print "\t<LI>$file\n";
}

print "</UL>\n";
print "</BODY>\n";
print "</HTML>\n";




~  James Fox
~  james@djassociates.com
~  +44 (0) 114 2210525

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org