CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
how to get the link url as scalar

 



brsaran
New User

Jul 24, 2010, 12:11 PM

Post #1 of 2 (1852 views)
how to get the link url as scalar Can't Post

hi

I want to extract all the links from a webpage as scalar

here is my actual code


Code
use WWW::Mechanize; 
my $m = WWW::Mechanize->new();
$url = 'http://www.ebi.ac.uk/Tools/blast2/';
$m->get($url);
$m->form_number(1);

$m->field('sequence', 'EALLKLKRLGSIHLKNKI');
$m->submit_form();
$res = $m->content();


$res has the content of the submitted page and i want to extract the links in the page and want to store it as a scalar is there any way?

thanks in advance


FishMonger
Veteran / Moderator

Jul 24, 2010, 12:46 PM

Post #2 of 2 (1851 views)
Re: [brsaran] how to get the link url as scalar [In reply to] Can't Post

See: HTML::LinkExtor - Extract links from an HTML document
http://search.cpan.org/~gaas/HTML-Parser-3.66/lib/HTML/LinkExtor.pm

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives