#!/usr/bin/perl
use strict;
use warnings;
use HTML::TreeBuilder;
my $filename = q{html/monk.html};
my $r = HTML::TreeBuilder->new;
$r->parse_file($filename);
#
my @cells = $r->look_down(
_tag => q{td},
width => q{48%},
valign => q{top},
);
my $i;
for my $cell (@cells){
my $bold = $cell->look_down(_tag => q{b});
print $bold->as_text, qq{\n};
for my $item ($cell->content_refs_list) {
next if ref $$item;
print $$item, qq{\n};
}
my $link = $cell->look_down(
_tag => q{a},
);
print $link->attr(q{href}), qq{\n\n};
last if $i++ > 2;
}
|