On Wed, 17 Mar 2010 20:19:01 +0530, raphael() wrote: > Hello, > > Is there a way to save/store downloaded data (using WWW::Mechanize) in > memory (temporarily) > rather than writing it to disk. Like store 10MB in memory and then flush > it to the hard disk when data reaches 10MB.
Not easily. WWW::Mechanize is a LWP::UserAgent; look at the documentation for that module and see the :content_cb hook. Write a handler to concatenate data in memory until you reach 10MB and then flush to disk, writing the remainder there. Set read_size_hint to below 10MB. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl1/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/