As written below, it works for me:
{C} > cat test.pl #!/usr/bin/perl use strict; use warnings; use LWP::Simple; use HTML::LinkExtor; use Data::Dumper; my $content = get("http://www.yahoo.com/"); #Get web page in content die "get failed" if (!defined $content); my $parser = HTML::LinkExtor->new(); #create LinkExtor object with no +callbacks $parser->parse($content); #parse content my @links = $parser->links; #get list of links print Dumper \@links; #print list of links out. {C} > perl -c test.pl test.pl syntax OK {C} > perl test.pl $VAR1 = [ [ 'link', 'href', 'http://l.yimg.com/a/lib/arc/core_1.0.5.css' ], [ 'link', ...OUTPUT TRUNCATED...
In reply to Re: LWP question
by VinsWorldcom
in thread LWP question
by sri1230
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |