I think you want
... my $fields = $form->field; my $dbfielddata = join ", ", map { $dbh->quote( $fields->{$_} ) } @fie +lds; ...
assuming that @fields holds the keys of the hash — otherwise, you might want to use keys %$fields instead (both for creating $dbfieldlist and $dbfielddata, so their ordering matches)
P.S.: instead of fiddling with quote() it's usually better to use placeholders.
In reply to Re: Map hashref to get values?
by Eliya
in thread Map hashref to get values?
by apu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |