http://qs321.pair.com?node_id=245162

emilford has asked for the wisdom of the Perl Monks concerning the following question:

I was wondering what the best solution for uploading larger files is. I have a script that is capable of uploading smaller sized files, but when I try to upload a 1.8MB pdf file, it times out and everything screws up. Here is the code that I am using to upload the file:
open (LOCAL, ">$uploadLocation/$schemedName") or dieNicely("Un +able to upload: $!"); while (read($file, $i, 1024)) { $size += 1024; print LOCAL $i; } close (LOCAL);
Again, this works nicely with smaller files, but I'm not sure how to get it to work nicely with larger files. Thanks for the help.