i trying revive perl script using long time ago. downloading files cloud storage local client. i'm pretty sure worked fine then, having issue lwp::useragent downloads file entirely memory before writing disk. expected , former behaviour should write chunks of received file target during download. i'm trying on osx perl 5.16.3 , 5.18 , tried on windows not know perl version more. pretty confident related perl version, not know used , want know changed. sub downloadfile { $url = shift; $filename = shift; $temp_filename = shift; $expected_size = shift; ( $download_size, $received_size, $avg_speed, $avg_speed_s, $avg_speed_q, $speed_count, $speed, $byte_offset, $http_status ) = ( 0, 0, 0, 0, 0, 0, 0, 0, 0 ); if ( -e $temp_filename , !$options{'no-resume'} ) { @stat = stat($temp_filename); if ( $expected_size > $stat[7] ) { $byte_offset = $stat[7]; $rec...