Actually
$ENV{CONTENT_LENGTH} contains more than just the file data. If you upload multiple files, or have other form fields, using
$ENV{CONTENT_LENGTH} is way off. My guess would be either with
length or with
-s/
stat.
Update: Note that even tho you only send file data thru, the
$ENV{CONTENT_LENGTH} still isn't the actual size of the file. Other data is send along, data which CGI novices don't need directly.
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.