in reply to Handling the POSTing of a file to a CGI script
To your first Question:
I have to do the same thing. I have not investigated about this yet, but I will tell to you when I done.
The second Q:
To write a file, simply open it in Write mode! :)
Don't remember exactly, but something like:
open(FILEHANDLE,">Filename");
Then, to print to it:
print FILEHANDLE, $Variable
remember to close FILEHANDLE; !:)