#!/usr/bin/perl -w use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('http://www.google.com/advanced_search?hl=en'); foreach my $inp (@{ $mech->{form}->{inputs} }) { print ref($inp),"\t$inp->{type}\t$inp->{name}\n"; }