WWW::Mechanize: Download a specific image
<p>I'm trying to download expression data for DNA sequences. On the page, the graph (a png image) is always the 6th, 7th, or 8th image on the page, but I do not want to download 2 extra images every time. </p>

<p>Inspecting the image on the page yields <code>&lt;img src="../trash/hgc/gtexGene_genome_6d0b_5d5220.png" border="1"&gt;</code>, though those last few numbers in the link to the image change every time.</p>

<p>In my code, I have </p>

<pre><code>my $image = $mech1-&gt;find_image( alt_regex =&gt; qr/gtexGene/i );;
$mech1-&gt;get($image -&gt; URI);
$mech1-&gt;save_content("exp.png");
</code></pre>

<p>which is not working.</p>

<p>How can I download the image given only what some of the contents of its link are?</p>