There are two possibilities. First, it's possible that you might not get any data from the form field. That's unlikely as you're testing things, but it's a possibility.
Second and likely the case, you don't have permission to open the file. You're checking the return value of open which is good. Now, check it. Look in the error log or use CGI::Carp to send the error to the browser during debugging. That'll give you a clue as to what the problem is — probably no permission to write to the current directory.
In reply to Re: How to write to a file using CGI
by chromatic
in thread How to write to a file using CGI
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |