in reply to
Re^2: CGI script cannot create file.
in thread CGI script cannot create file.
Well, you could run the following at the command prompt as your user, it does use Perl after all ;)
perl -e ' $apache = qx(ps -ef | grep httpd); @fields=split /\s+/, $apa
exec ("chown $fields /path/to/flat/file/directory");'
However setting up a directory with write permission for the uid of the web service directly makes more sense from a certainty of action and security perspective
print "Good ",qw(night morning afternoon evening)[(localtime)/6]," fellow monks."