my @links = $mech->find_all_links_dom(url_regex => 'asdf.html'); foreach my $link (@links) { print $link->__attr('onclick'); }