in reply to CGI Upload: Bad file descriptor
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:<form action="some.cgi" method="post" enctype="multipart/form-data">
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: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;
Where do you initialize these variables?open (OUTFILE, ">/web/aps/mi/$name/$ver/$_") or die "Cannot open $n +ame: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CGI Upload: Bad file descriptor
by bkiahg (Pilgrim) on May 24, 2004 at 16:21 UTC |