in reply to Map hashref to get values?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Map hashref to get values?
by apu (Sexton) on Mar 07, 2012 at 23:44 UTC | |
by aaron_baugher (Curate) on Mar 08, 2012 at 01:44 UTC | |
by apu (Sexton) on Mar 08, 2012 at 04:29 UTC | |
by Eliya (Vicar) on Mar 07, 2012 at 23:50 UTC |