perl_diver has asked for the wisdom of the Perl Monks concerning the following question:

Hello, i want to to extract the LAST link matching a particular regexp from a web page by using WWW::mechanize and $mech->find_link(n=>???....) what key value pairs should i supply to get the LAST link that matches a particular regualr expression. Thanks -PD

Replies are listed 'Best First'.
Re: A question on WWW::mechanize
by fglock (Vicar) on Nov 09, 2004 at 16:52 UTC

    How about (untested)

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