in reply to uploaded file is not proper

Adding on to the advice already given, you really should be using CGI.pm's upload() instead of param() to upload a file:
  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 = $query->upload('uploaded_file');
     while (<$fh>) {
        print;
     }

  In an array context, upload() will return an array of
  filehandles.  This makes it possible to create forms that
  use the same name for multiple upload fields.

  This is the recommended idiom.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
  • Comment on (jeffa) Re: uploaded file is not proper