#!/usr/bin/perl -w print "Content-type: text/html\n\n"; opendir(DIR,"./") || die print "Couldn't open directory"; my @files = readdir(DIR); closedir(DIR); my $filename = __FILE__; my @noshow = (".", "..", $filename); foreach $f (@files) { unless (grep /$f/, @noshow) # look for $f in @noshow { print "$f
\n"; } }