Display LWP::UserAgent download progress
<p>I'm downloading a large file directly to a file with Perl using LWP::UserAgent and the <code>:content_file</code> option.</p>

<p>This is a simplified example of my code:</p>

<pre><code>require LWP::UserAgent;

my $ua = LWP::UserAgent-&gt;new;
$ua-&gt;timeout(3600);
$ua-&gt;env_proxy;

my $response = $ua-&gt;get(
    'http://example.com/largefile.xml',
    :content_file   =&gt; 'path/to/file/largefile.xml'
);

if ($response-&gt;is_success) {
    print "File downloaded\n";
}
else {
    die $response-&gt;status_line;
}
</code></pre>

<p>Is there any way to display the percentage of the download status? (or something similiar to <code>wget</code> output)</p>

<pre><code>10% [===&gt;                                  ]  65.120.154  527K/s 
</code></pre>