uninitialized value

uninitialized value

am 19.03.2006 18:43:46 von stu21774

When I use HTML::TreeBuilder I get this:

Use of uninitialized value in subroutine entry at=20
/Library/Perl/5.8.6/HTML/TreeBuilder.pm line 94.

What would be the easiest way to fix this? Thanx.

--=20
_______________________________________________

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

am 19.03.2006 19:14:33 von Andy

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@petdance.com => www.petdance.com => AIM:petdance

Re: uninitialized value

am 20.03.2006 02:09:03 von stu21774

> ----- Original Message -----
> From: "Andy Lester"
> To: "stu meacham"
> Subject: Re: uninitialized value
> Date: Sun, 19 Mar 2006 12:14:33 -0600
>=20
>=20
>=20
> On Mar 19, 2006, at 11:43 AM, stu meacham wrote:
>=20
> > 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.
>=20
>=20
> Need to know what your code and data look like.
>=20
>=20
> --
> 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.

--=20
_______________________________________________

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

am 20.03.2006 06:11:36 von Andy

--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@petdance.com => www.petdance.com => AIM:petdance




--Apple-Mail-1--831943848--

Re: uninitialized value

am 20.03.2006 18:08:21 von metaperl

On 3/19/06, Andy Lester 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