uninitialized value
When I use HTML::TreeBuilder I get this:
Use of uninitialized value in subroutine entry at
/Library/Perl/5.8.6/HTML/TreeBuilder.pm line 94.
What would be the easiest way to fix this? Thanx.
--
_______________________________________________
Search for businesses by name, location, or phone number. -Lycos Yellow Pa=
ges
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos .com/default.as=
p?SRC=3Dlycos10
Re: uninitialized value
On Mar 19, 2006, at 11:43 AM, stu meacham wrote:
> When I use HTML::TreeBuilder I get this:
>
> Use of uninitialized value in subroutine entry at
> /Library/Perl/5.8.6/HTML/TreeBuilder.pm line 94.
>
> What would be the easiest way to fix this? Thanx.
Need to know what your code and data look like.
--
Andy Lester => andy [at] petdance.com => www.petdance.com => AIM:petdance
Re: uninitialized value
> ----- Original Message -----
> From: "Andy Lester" <andy [at] petdance.com>
> To: "stu meacham" <stu21774 [at] lycos.com>
> Subject: Re: uninitialized value
> Date: Sun, 19 Mar 2006 12:14:33 -0600
>
>
>
> On Mar 19, 2006, at 11:43 AM, stu meacham wrote:
>
> > When I use HTML::TreeBuilder I get this:
> >
> > Use of uninitialized value in subroutine entry at
> > /Library/Perl/5.8.6/HTML/TreeBuilder.pm line 94.
> >
> > What would be the easiest way to fix this? Thanx.
>
>
> Need to know what your code and data look like.
>
>
> --
> use strict;
use LWP::Simple;
use HTML::TreeBuilder;
my $html =3D get("http://wwww.oreilly.com/");
my $root =3D HTML::TreeBuilder->new_from_content(\$html);
my %images;
foreach my $node ($root->find_by_tag_name('img')) {
$images{ $node->attr('src') }++;
}
foreach my $pic (sort keys %images) {
print "$pic\n";
}
The code is from Sean Burke's 'Perl & LWP' page 13. I get a similar error =
message when I run
the other short code on the same page of his book using HTML::TokeParser. =
The differences in the error message are the pm and the line number.
--
_______________________________________________
Search for businesses by name, location, or phone number. -Lycos Yellow Pa=
ges
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos .com/default.as=
p?SRC=3Dlycos10
Re: uninitialized value
--Apple-Mail-1--831943848
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
I get no output at all.
> use LWP::Simple;
> use HTML::TreeBuilder;
>
> my $html = get("http://wwww.oreilly.com/");
You've got "wwww" instead of "www". You're getting no output in
$html back at all.
xoa
--
Andy Lester => andy [at] petdance.com => www.petdance.com => AIM:petdance
--Apple-Mail-1--831943848--
Re: uninitialized value
On 3/19/06, Andy Lester <andy [at] petdance.com> wrote:
>
> On Mar 19, 2006, at 11:43 AM, stu meacham wrote:
>
> > When I use HTML::TreeBuilder I get this:
> >
> > Use of uninitialized value in subroutine entry at
> > /Library/Perl/5.8.6/HTML/TreeBuilder.pm line 94.
> >
> > What would be the easiest way to fix this? Thanx.
>
>
> Need to know what your code and data look like.
not only that , but do "make test" and report the results 00system.t
so that we know what version of HTML::Tree(Builder)? you are running