The elements in the array are HTML::Form::Input objects.  If you look
further down in the man page for HTML::Form, it lists methods which
can operate on them, such as "type" or "value".

For example, if you wanted to find the first input of type "submit"
with value of "Update", you could do this :

sub FindUpdate {
  my $form = shift;
  my @inputs = $form->inputs;
  for (my $i=0 ; $i<=$#inputs ; $i++) {
    my $inp = $inputs[$i];
    if ($inp->type eq "submit" && $inp->value =~ /update/i) {
      print "Found update button.\n";
      return $inp;
    }
  }
  print "ERROR: Update button not found.\n";
  return undef;
}


[EMAIL PROTECTED] writes:
 > 
 > Hi,
 > 
 >   Pretty much as the subject line says. What exactly does that puppy return,
 > in what format? I have not been able to find documentation about it other than
 > a single line in the perldoc itself. 
 > 
 >  I have tried printing each element of the array that it's been reported to
 > return, but I don't know how to dereference the pointers I am getting, like
 > the ones here:
 > 
 >  Field: <HTML::Form::TextInput=HASH(0x2d59c0)>
 >  Field: <HTML::Form::TextInput=HASH(0x2d5a98)>
 > ....
 >  Field: <HTML::Form::TextInput=HASH(0x2d50e8)>
 >  Field: <HTML::Form::SubmitInput=HASH(0x2d52e0)>
 >  Field: <HTML::Form::IgnoreInput=HASH(0x2d534c)>
 > 
 > thanks
 > 
 > Cenk U
 > 

-- 
--------------------------------------------------------------
Fair Winds,     Software Engineer and WWW developer
Chris Dunn      MRM, inc.

Email: [EMAIL PROTECTED]
Phone: (919) 544-6500  Ext 228
Pager: (919) 506-0819

http://www4.ncsu.edu/~w_dunn
--------------------------------------------------------------

Reply via email to