> open...or die... statement, but then i got an
> internal server error 500.
You should add the following lines to your
cgi scripts:
use CGI::Carp qw(fatalsToBrowser);
And/or you should execute your perl scripts
from a command line before going through
the web server, to make sure they do run.
If a cgi is working, and then breaks with the
infamous error 500 after you changed to
code, then you almost certainly got your
perl syntax wrong.
> when i put in the $! i get the error message Permission denied.
Well, that's your problem then. The cgi script
does not have the correct permissions to open
xxx.txt for output. So, "Permission denied."
Given that you haven't told it a directory to open
it in, your script will try to open it in the current
directory, which will presumably be cgi-bin or
similar. It's entirely appropriate that a cgi does
not have permission to open files for writing in
the cgi directory.