syswrite FILEHANDLE,SCALAR
...
Returns the number of bytes actually written, or "undef" if
there was an error (in this case the errno variable $! is also set).
syswrite seems to be the best answer, only I have never used this before. I have looked into it, but seems a bit complicated to use. Also if I got this working, how would I go about finding out how much a user has already downloaded on a partial download?
It seems to me that if I could find out the partial download then it would work great. Otherwise I would not know what they have already downloaded and thus not be able to set the offset and would not be able to count the download when it finished, as I would not know it was finished.
There must a way to just find out when a download completes. Using a eof like statement or something.