#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); $dirtoget="chat"; opendir(IMD, $dirtoget) || die("Cannot open directory"); @thefiles= readdir(IMD); closedir(IMD); print "Content-type: text/html\n\n"; print "
"; foreach $f (@thefiles) { unless ( ($f eq ".") || ($f eq "..") ) { print "$f