use WWW::Mechanize; $ua = WWW::Mechanize->new; my $response = $ua->get($url); my $next_response = $ua->follow_link(text_regex => qr/continue.../);