in reply to CGI Upload: Bad file descriptor

Is the encoding type for the form that points to this CGI script set to "multipart/form-data" ? If not, CGI's uploading functions will not work as expected. Your form declaration should look something like this:
<form action="some.cgi" method="post" enctype="multipart/form-data">
If you are using CGI.pm to generate the form, then you should use CGI's start_multipart_form function. Here is an example from examples/file_upload.cgi in the CGI.pm distribution:
print start_multipart_form(), "Enter the file to process:", filefield('filename','',45), br, checkbox_group('count',\@types,\@types), p, reset,submit('submit','Process File'), endform;
Aside, I don't see where the variables $name and $ver are set before using them in your loop where you attempt to handle the file uploads:
open (OUTFILE, ">/web/aps/mi/$name/$ver/$_") or die "Cannot open $n +ame: $!";
Where do you initialize these variables?

--sacked

Replies are listed 'Best First'.
Re: Re: CGI Upload: Bad file descriptor
by bkiahg (Pilgrim) on May 24, 2004 at 16:21 UTC
    That was it! Thank you sacked.

    I initialize those variables when I pull the rest of the form. I removed it for brevity.