Dan Armstrong <[EMAIL PROTECTED]> wrote:
: use HTML::TokeParser;
: my $file = shift;
: my $p = HTML::TokeParser->new($file);
: while ($p->get_tag('td')) {
: print $p->get_text(), "\n";
: }
:
: If I substitute 'td bgcolor=#ffffdc' for 'td' in line 4,
: however, the output is zilch.
while ( my $tag = $p->get_tag('td') ) {
print $p->get_trimmed_text if $tag->[1]{bgcolor} eq '#ffffdc';
}
Or:
while ( my $tag = $p->get_tag('td') ) {
print $p->get_trimmed_text if $tag->[1]{bgcolor} =~ /ffffdc/;
}
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>