Perl Script to resume download

Hi,

i am looking for a perl script[only] that can resume broken download images from a remote server. Can anyone help me on this.

thanks,
Vince

First, why Perl only? wget does supply that functionality pretty nicely.
Second, since I know of no Perl Module to do that by default, it would work something like this:

  • Find out how much has already been downloaded
  • Create an HTTP Request (e.g. HTTP::Request from the LWP Bundle)
  • Set an additional header for the offset (Content-Range as specified in RFC 2616). HTTP::Headers from the LWP Bundle can do that.
  • Send the request and append the answer to the file.