in reply to Re^2: CGI file upload: Print to filehandle vs move file
in thread CGI file upload: Print to filehandle vs move file
Sorry, my post wasn't really so clear. The off-topic point was that setting binmode on a filehandle and then calling readline on it (<$upload_filehandle>) slurps the entire file into RAM, which is bad if you run out of RAM.
The real point was that, if you don't need to process the file as it comes in, it's much faster to just rename it. I would probably solve this problem by renaming the temp file but I second dhoss's suggestion to look at CGI::Upload before you decide.
|
|---|