in reply to help with HTML::Form
But if you're really wanting to do the former, then keep in mind that, typically, few if any form inputs have values to start with.
That being said, what you have above should work. But, two things:
1. Forms don't usually have names. If you have more than one form, you'll need to "know" it by something else.
2. In the inner loop, that $data variable will actually be a reference to an input object. You can use that as the key in a hash, but I'm not sure that's what you're looking for anyway. Perhaps you mean something like this:
But if you could explain exactly what it is you're trying to accomplish, I might be able to show you better examples.for my $input ( $form->inputs ) { my $name = $input->name; my $value = $input->value; if ( defined $name && defined $value ) { $hash{ $name } = $value; } }
jdporter
...porque es dificil estar guapo y blanco.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: help with HTML::Form
by gnangia (Scribe) on Nov 08, 2002 at 22:21 UTC |