I'm not sure if this will help but I had the same problem. Then I got a new upload script. This script is easy and you can run it from within a webpage. It works great for all files types too :-) You, as you know can place it anywhere and password protect to keep others from using this page. If you're interested email me and I'll send the zip to you. It would be a lot to paste here. allletters@allletters.com Jackie

Hi You need to use the binmode function and that will fix your problem.

The binmode functions arranges for the file to be treated in binanry mode on operating systems that distinquish between binary and text file. It should be called after the open but before any I/O is done of the filehandle.

use CGI qw/:standard/; => The use operator loads the CGI.pm definitions and imports the ":standard" set of function definitions.

:cgi These are all the tags that support one feature or another of the CGI protocol, including param(), path_info(), cookie(), request_method(), header() and the like.

Function-Oriented vs Object-Oriented Use CGI.pm can be used in two distinct modes called function-oriented and object-oriented. In the function-oriented mode, you first import CGI functions into your script's namespace, then call these functions directly.

So, I would recommend that you use Object-Oriented than Function Oriented because the Function Oriented has to import the "standard function into your cgu-script(namespace) which will take longer to compile and The object-oriented mode also has the advantage of consuming somewhat less memory than the function-oriented coding style.

Example of Object Oriented.

#!/usr/local/bin/perl use CGI; $q = new CGI;

$cure= $q->param('name');

print $cure;

########################

Now to go over why your getting errors:

Example.

Lets say you have a directory called cure and you want your script to create a file called perl.txt for you then you need to set the PERMISSION on the cure directory to 777

If you manual created the file perl.txt in the cure directory then you need to set the PERMISSION to 755 on the cure directory.