in reply to Creating a file in a CGI script...

You can do
open IN, ">filename";
it will automatically create the file and you can write to it at will. if you create your file before-hand... use chmod 777 filename