in reply to SAVE DATA
Have you looked at LWP::UserAgent::get? It can save the response directly to a file and it also offers you the option of a progress callback.