I have a very short cgi script in which I must open a file, output some text from a form to it and close it. The problem is I can't tell if the file is being created and if it is, I can't find it. Where would it go? If I run the script (minus the grabbing the form fields part) in Perl, the file gets created, I can add some static text to it and everything is fine. Why isn't this working for me?

using the or die("$!") along with CGI:Carp qw(fatalsToBrowser) will check to make sure the file was created or at least opened if it already existed. If not it will give you an error in your browser that the file could not be opened. Using it on the close portion simply checks to make sure ther were no errors when closing the file.

Also, Darian, when I use the "or die()" function, I get an error from the server. It's one of the generic, cryptic errors that tell you to contact the webmaster. I've tried different permutations of the file permissions and that doesn't help. In general, it feels like I'm working with a black box. I don't know how to use the debugging tools, I don't have access to the server log files and I'm pretty new to Perl (although it's very similar to C, thank God!) Your advice is appreciated.