Specifying tag attributes in TokeParser

2005-01-21 Thread Dan Armstrong
I am trying to strip zip codes out of a table which looks like this: 10001 NY 212 NEW YORK 40.7496 -73.9971 The zip code is between the tags and . Now, the code below outputs all text inside all pairs: use HTML::TokeParser; my $file = shift; my $p =

RE: Specifying tag attributes in TokeParser

2005-01-22 Thread Charles K. Clarkson
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=#dc' for 'td' in line 4, : however, the output is zilch. while