On 2003-12-08, Brian Cassidy <[EMAIL PROTECTED]> wrote: > Mark, > > Looking at the docs, I couldn't see a way either. :/ > > So, I whipped up a quick example with HTML::TokeParser::Simple. It's > searching for "size" rather than "maxlength", but you get the idea. > > use WWW::Mechanize; > use HTML::TokeParser::Simple; > > my $www = WWW::Mechanize->new; > $www->get( 'http://search.cpan.org/' ); > > my $content = $www->content; > > my $p = HTML::TokeParser::Simple->new( \$content ); > > while ( my $token = $p->get_token ) { > next unless $token->is_tag( 'input' ); > my $attr = $token->return_attr; > print 'size = ' . $attr->{ size } if $attr->{ size }; > }
Thanks Brian. I'm also a fan of TokeParser::Simple. I'll go this route when I need to. I'll put in a plug for this functionality being added to HTML::Form. It seems like one of the few things related to HTML::Forms that it can't already do. Mark -- . . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Stosberg Principal Developer [EMAIL PROTECTED] Summersault, LLC 765-939-9301 ext 202 database driven websites . . . . . http://www.summersault.com/ . . . . . . . .