$form = $mech->form_number(1); @inputs = $form->inputs; foreach $input (@inputs) { print $input->type.'->'.$input->name."\n"; }