print "Content-type:text/html \n\n"; opendir(TRILL, '//Trillian/D/digis/weddings') or die "$!"; @trill= readdir(TRILL); closedir(TRILL); rest of code is HTML output