Thanks for the upload() tip. I found an example here at the monastery and plugged it into my code. Worked wonderfully.
Here's my revised code:
$| = 1; my ($file,$path) = @_; my $filename = $query->upload($file); my $buffer; open(OUTPUT, ">$path/$filename"); binmode($filename); binmode(OUTPUT); while( read($filename, $buffer, 64*2**10) ) { print OUTPUT $buffer; } close(OUTPUT); return ($filename);
I would still like to know what the original problem was, but right now I just need a solution.
In reply to Re^2: Bad file descriptor when uploading file via CGI
by bradcathey
in thread Bad file descriptor when uploading file via CGI
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |