in reply to problem changing name of uploaded file!

When you upload a file CGI.pm creates a temporary file to store the contets of the upload. CGI.pm introduced the upload() method in version 2.47. Before this you could use the value returned by param('upload_file') as the file handle in order to read from the file. I have had problems with the upload() method in versions of CGI.pm up to and including 2.75 so usually kludge around it and do it the old way if necessary.

Anyway once you have your file handle you read from the temporary file and write it somewhere new so I don't understand what you mean in the second bit. A quick and dirty solution would just be to use Perl's rename($old, $new) function if everything works currently to get the final filename you want.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

  • Comment on Re: problem changing name of uploaded file!