Get http-response header with Perl's File::Fetch <p>I want to download a file in a Perl script.</p> <p>If the download is OK, this works fine,</p> <pre><code>use File::Fetch; $ff = File::Fetch-&gt;new(uri =&gt; 'http://some.where.com/dir/a.txt'); $where = $ff-&gt;fetch() or die $ff-&gt;error; </code></pre> <p>If there is an error, I want to see the http-response header. How can I do this?</p>