in reply to open dir

require("cgi-lib.cgi"); &ReadParse;

Change this to  use CGI; if you can. It is safer, and more standards compliant.