Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: LWP::UserAgent & memory problems

by tobyink (Canon)
on Oct 23, 2012 at 19:44 UTC ( [id://1000515]=note: print w/replies, xml ) Need Help??


in reply to LWP::UserAgent & memory problems

You could try using one of the callback-based HTTP modules such as AnyEvent::HTTP - you define a callback function which gets passed the downloaded data in chunks. This function can write the data to an open filehandle. The whole data never needs to be held in memory at once.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1000515]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-16 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found