[SP-pm] use WWW::Mechanize
Daniel de Oliveira Mantovani
daniel.oliveira.mantovani at gmail.com
Wed Sep 17 12:41:25 PDT 2008
Boa tarde!
Estou com dúvida de como usar o $1.
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $google = WWW::Mechanize->new();
my $url = '
http://www.google.com.br/search?hl=pt-BR&q=nasa&btnG=Pesquisa+Google&meta';
$google->get($url);
my $busca = $google->content();
*print $1 for $busca=~ /<a href="(.*)">/;*
Gostaria de saber como faço para imprimir só o que ta entre parênteses de
uma forma correta, tentei usar o find_all_links() mas vem tudo até o que não
é link.
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $url = "
http://www.google.com.br/search?hl=pt-BR&q=nasa&btnG=Pesquisa+Google&meta=";
my $busca = WWW::Mechanize->new();
$busca->get($url);
*$busca->find_all_links();*
print $busca->content;
Obrigado.
--
Daniel de Oliveira Mantovani
"A sede pelo aprendizado é insaciável"
http://mantovanihouse.blogspot.com/
------------------------------------------------------------
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20080917/6524d9c2/attachment.html>
More information about the SaoPaulo-pm
mailing list