in reply to Re: how to get the sizes of a file when i use CGI.PM to upload it~~?
in thread how to get the sizes of a file when i use CGI.PM to upload it~~?

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.