Tengo el siguiente código.
use LWP::UserAgent;
my $nave = LWP::UserAgent->new;
$nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
$nave->timeout(5);
$code = toma("http://www.google.com.ar/search?q=test&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:es-ES:official&client=firefox-a");
while($code=~/<a href="(.*?)" class=l onmousedown/mig) {
print $1."\n";
}
sub toma {
return $nave->get($_)->content;
}
El problema es que la expresión regular no funciona. El patrón es así:
<a href="http://www.psicoactiva.com/tests.htm" class=l onmousedown
¿ Alguien me podría ayudar ?