in reply to Help using HTML::TokeParser to find INPUT and TEXT area tags

I'd use HTML::TokeParser::Simple. It's much easier to use and has several code samples included in the POD.

use HTML::TokeParser::Simple; my $p = HTML::TokeParser::Simple->new( $somefile ); while ( my $token = $p->get_token ) { next unless $token->is_start_tag( 'input' ) or $token->is_start_t +ag( 'textarea' ); my %attribute_hash = %{ $token->return_attr }; # do your thing ... }

In the snippet above, %attribute_hash contains the attribute names and values. It's up to you to figure out what you want to do with them.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.