In the previous question I was shown how to specify the byte range in an http request (using HTTP::Request
and LWP::UserAgent). This allows one to download a specific chunk of a while (e.g., bytes 10000 to 20000).
What I forgot to include in that question is: Can I get the size of the file before specifying the bytes range. Since I will always be retrieving the last x bytes in the file, I would like to get the total size so that I can calculate the range so that the request range is, in effect, total_size minus x to total_size.