in reply to LWP::UserAgent & memory problems

Take a look at the :content_cb     => \&callback parameter to GET.

Essentially, you supply a subroutine that LWP will call each time a new block of the file arrives, so you can save it to a file of your choice as it arrives, rather than accumulating it in memory and giving it to you in one huge lump.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong

Replies are listed 'Best First'.
Re^2: LWP::UserAgent & memory problems
by Uree (Acolyte) on Oct 24, 2012 at 09:25 UTC

    My approach to the issue was that, having tested a few different ways without success, it would actually be me doing something wrong/missing something rather than library's option/func not working as expected.
    For that reason, I stopped exploring different options and focused on spotting what Im missing out.

    Thanks for the suggestion, I'll give it a go.