in reply to Yet another CGI Upload problem - not like the others!
I think the last line is that bit that made the crucial difference. I didn't know that about 'read'. Anyway, thanks again, your help is very much appreciated. Wish I could get you all a Monastery mead!open(OUTFILE, ">$UPLOAD_DIR\/$file_name") or die "Upload failed ($!)"; binmode $fh; binmode OUTFILE; while ($bytes=read($fh, $buffer, 1024)) { $bytes_read += $bytes; print OUTFILE $buffer; } die "read failure ($!)" unless defined($bytes);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Find out what the bug was (was Yet another CGI Upload problem - not like the others!)
by adrianh (Chancellor) on Dec 11, 2002 at 22:04 UTC |