Reims has asked for the wisdom of the Perl Monks concerning the following question:
Executing that will give me this error:my $fh = $q->upload($filefield_name); #check for valid file handle if (defined $fh) { my $io = $fh->handle; open(OUTFILE, '>>', '/srv/www/cgi-bin/upload'); while ($bytesread == $io->read($buffer, 1014)) { print OUTFILE $buffer; } print "File uploaded"; } else { print "file handle not defined"; }
After a couple of hours of finding loads of tutorials telling me to do exactly that, I don't know what I'm doing wrong.Undefined subroutine Fh::handle at /srv/www/cgi-bin/fo_www/document_add.cgi line 51
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI file upload
by marinersk (Priest) on Aug 01, 2013 at 11:36 UTC | |
|
Re: CGI file upload
by Anonymous Monk on Aug 01, 2013 at 12:33 UTC | |
by Reims (Initiate) on Aug 15, 2013 at 09:18 UTC | |
|
Re: CGI file upload
by Anonymous Monk on Aug 01, 2013 at 12:34 UTC |