Ian Mahuron wrote:
> What is the proper way to take the filehandle provided by $upload->fh and write the
>file to disk? I seem to be having buffering
> issues w/ the following (file is truncated):
>
> if (open(OUTFILE, ">$u_fullpath")) {
> print OUTFILE $buffer while read($fh, $buffer, 8*1024);
> } else {
> ...
> }
>
> a simple $| = 1; before the print didn't seem to help.. maybe OUTFILE is not hot?
select((select(OUTFILE), $|++)[0]); #unbuffer OUTFILE and return select to prev state
> Dunno.. this is my first run in w/ buffering
> issues. I hope someone can help.
i see u are not checking for errors on open. u should.
u should also check for errors on close. if u get an error on close, then the file
you are closing is probably not going to be
written with all data.
>
>
> TIA
>
> Ian
hth,
--
___cliff [EMAIL PROTECTED]http://www.genwax.com/