in reply to Re: Process a HTML file to get information from it.
in thread Process a HTML file to get information from it.
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 |