I am getting can't find any link matching regexp but I can clearly see two links matching the regexpuse strict; use warnings; use WWW::Mechanize; my $agent = WWW::Mechanize->new(); my $regex = 'showthread'; my $username1 = 'guesthere52'; my $subject = 'official website'; my $message = 'Offical website http://supermanreturns.warnerbros.com'; my $url ='http://www.google.co.uk/search?hl=en&safe=off&q=intitle%3A%2 +2superman+returns%22++%22you+may+post+new%22&meta='; $agent->get($url); $agent->agent_alias( 'Windows IE 6' ); my @urls = $agent->find_all_links(); foreach(@urls){$agent->follow(url_regex => qr/showthread/);} foreach my $link(@urls) { $link->url(); $agent->set_visible($username1, $subject, $message, $link->url()); $agent->click("submit"); } print $agent->response()->as_string();
In reply to Why code is not posting by coder45
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |