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
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 =