Lightning flashed, thunder crashed and Nichole Bialczyk <[EMAIL PROTECTED]> whispered
:
| i'm sorry. i didn't think that you guys would want me to include my code.
| i just assumed that i should try to make my question to the point with as
| little text as possible. i am still having the same problem (and i do
| have the "). here is my exact code:
No apology necessary. You had the right ideas as far as keeping to the
point and including the least amount of code necessary. However, when you
provide code, it should be cut'n'paste not retyped.
I've seen several posts that answer your question. The userID the script
is running as (the web server's userID) doesn't have permission to write to
the file or directory. You're code uses ">" to overwrite/create a file,
rather than appending to an existing file. In this case, you need to make
sure that both the file and the directory have the proper permissions.
As far as your other question about a closed filehandle error, it means you
are trying to write to a filehandle that the interpreter doesn't think is
open. According to the code you had here:
if (open(LOG, ">$log") {
# do error stuff
exit;
}
print LOG "....";
If this is what you really have in your code, you have your logic
backwards. The print statement will never be reached if the open
succeeds. If it fails, then the filehandle won't be opened and the print
statement will be reached, leading to an attempt to write to a closed
filehandle.
-spp