frank1 has asked for the wisdom of the Perl Monks concerning the following question:
My script is working, but am asking how can remove out anything in country field
because now am getting response very well like:
FURRY JEO Country
so i want to remove anything in Country field, because there random digits
use WWW::Mechanize; use WWW::Mechanize::TreeBuilder; use LWP::UserAgent; <!doctype html> <html> <head> </head> <body> <p class='tik-1'>FURRY JEO<span class='info'>Sir</span> Country</p +> </body> </html> my $mech = WWW::Mechanize->new; WWW::Mechanize::TreeBuilder->meta->apply($mech); $mech->get( 'link' ); # Find all <h1> tags my @list = $mech->find('h1'); my @list = $mech->look_down('_tag' => 'p', 'class' => 'result__BigRate-sc-1bsijpp-1 i +GrAod'); foreach (@list) { $Resp = $_->as_text(); print $Resp; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: stripping out some info
by Corion (Patriarch) on Jan 30, 2022 at 18:09 UTC |