in reply to Empty content_file for LWP behind a proxy

In doing so, the content_file is empty after executing the code,

Well, that code isn't supposed to create a file

Switch to WWW::Mechanize, its less typing/friendlier interface to LWP

$mech->get( $uri, ':content_file' => $tempfile );