Presuming the server you're downloading from is sending the proper headers, it should send a Content-length: header. From the LWP::Simple POD:
head($url) Get document headers. Returns the following 5 values if successful +: ($content_type, $document_length, $modified_time, $expires, $serve +r) Returns an empty list if it fails. In scalar context returns TRUE +if successful.
Therefore to make a determination based on filesize:
$content_length = (LWP::Simple::head($url))[1];
In reply to Re: Determining file size over HTTP connection
by eibwen
in thread Determining file size over HTTP connection
by mellin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |