Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Process a HTML file to get information from it.

by Griffler (Novice)
on Dec 11, 2006 at 19:06 UTC ( [id://589119]=note: print w/replies, xml ) Need Help??


in reply to Re: Process a HTML file to get information from it.
in thread Process a HTML file to get information from it.

I tried your code and I got the following error.... Can't call method "right" without a package or object reference at C:\Change\2539\testit2.pl line 21. I modified the code to look like this:
use strict; use warnings; use HTML::TreeBuilder; my $root = HTML::TreeBuilder->new (); $root->parse_file ("c:\\change\\2539\\index.html"); for ($root->look_down ('_tag', 'a')) { my $href = $_->attr ('href'); next if ! $href; my $sib = $_->right ()->right (); my $number = $sib->as_text (); print "$href: $number\n"; }

Replies are listed 'Best First'.
Re^3: Process a HTML file to get information from it.
by chanio (Priest) on Dec 12, 2006 at 16:02 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://589119]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-20 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found