in reply to How to properly go through a WWW::Mechanize::Link object?

Have you looked at WWW::Mechanize::Link?

You have the list of links in your array @links. To get at the first link, you can use $links[0].

my $mech = WWW::Mechanize->new(); $mech->get( $url ); my @links = $mech->links(); print sprintf "I have %d links\n", 0+@links; for my $link (@links) { print "One link points to " . $link->url; print "\n"; };