Stephen Le wrote:
I'm writing a download manager in Perl and using the LWP library of
Perl modules.

Is there any way I can save the contents of a HTTP::Response object
directly to disk? I don't want particularly large requests to be
cached into memory.

Yes. Look at the documentation for LWP::UserAgent. You can supply a :content_file option to the get() method:

  my $resp = $ua->get($url, :content_file => 'file.dat');

HTH,

Bob

--
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