Why are you using $file for the upload field?
# name entered by the user for the uploaded file my $file = $formdata->param('file'); # the actual filehandles for the uploaded file my $fh = $formdata->upload('file');
Obviously $file and $filename are getting printed. Since "$fh is defined" wasn't printed, we know it is undefined. Why is it undefined? Unless $file is 'file' or there's an upload field called 'test.jpg', $fh will be undefined. As for the "Premature end of script headers" error, I noticed that you didn't print a header. Thus the error message.
Hope this helps.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In reply to Re: Upload Question
by antirice
in thread Upload Question
by joev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |