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"; } #### Undefined subroutine Fh::handle at /srv/www/cgi-bin/fo_www/document_add.cgi line 51