in reply to A question on WWW::mechanize

How about (untested)

$mech->find_all_links( text_regex => qr/download/i )->[-1]