Ah -- CGI .. so that the client is windows and host unix doesn't really matter...
anyways, i think you need to do binmode OUTPUT .. Read the entire (especially the very last part: Be sure to call binmode() on any handle that you create to write the uploaded file to disk.) "CREATING A FILE UPLOAD FIELD" section in the CGI docs. You may also be interested in the my $fh = $p->upload('docname') usage as well.