sri1230 has asked for the wisdom of the Perl Monks concerning the following question:
Can some one tell me why the get in this code fails to retrieve anyhting?
#!/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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: LWP question
by VinsWorldcom (Prior) on Jan 20, 2010 at 21:42 UTC | |
Re: LWP question
by eric256 (Parson) on Jan 20, 2010 at 22:47 UTC | |
by sri1230 (Novice) on Jan 21, 2010 at 14:45 UTC | |
Re: LWP question
by fod (Friar) on Jan 20, 2010 at 21:45 UTC |
Back to
Seekers of Perl Wisdom