in reply to appending a file

You have the line
open(DATABASE, ">>/http01/cgi-bin/form/db/db.txt")
You might get few more clues with:
my $fname="/http01/cgi-bin/form/db/db.txt" open(DATABASE,">>$fname") || die " $fname $!";
You might try looking at the server logs.
/var/log/apache/error.log
is a common place to start looking for logs

You might try posting how the "not working" manifests itself. No data in file? error message? bad data in the file?

Hope this helps



--mandog