usef wrote:
> Hi,
> Is there any way to get the size of a file without downloading it?
> I want to write a program using LWP to download a file only
> if it is bigger
> than 3K but smaller than 500K.
> So I need to know the file size in the first place.

You issue a HEAD request to the server and look at the Content-Length
response header.

You can use the LWP::Simple module's "head" method to get this information
easily.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to