Subject: | trouble uploading files with mozilla |
I'm trying to make a simple file uploader using CGI.pm's $query->upload. All the code I've tried results in "Use of uninitialized value in <HANDLE>" when it tries to read the uploaded file.
The code I have now, which is pretty close to the example code I can find is:
my $filename = $q->param("filename");
$filename =~ s/.*[\/\\](.*)/$1/;
my $upload_filehandle = $q->upload("filename");
while ( <$upload_filehandle> ) {
print STDERR;
}
looking at a Dumper of $q, I don't see any .tmpfiles.
googling, finds this thread:
http://mail.pm.org/pipermail/cedarvalley/2003-December/000009.html
which seems to be the same problem I'm looking at.