Also there are an error in this code: my $fh = $q->upload( $file ); It should be like this (according to CGI.pm): my $fh = $q->upload( 'my_upload_field_from_form' );
From CGI.pm:
To be safe, use the upload() function (new in version 2.47). When called with the name of an upload field, upload() returns a filehandle, or undef if the parameter is not a valid filehandle.$fh = upload("uploaded_file"); while (<$fh>) { print; }
In reply to Re^2: CGI Error
by izut
in thread CGI Error
by space
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |