in reply to doing it the right way
in thread How hashes present keys and values.

Yes, although a simpler way to generate $l_placeholder is:     my $l_placeholder = join ',', ('?') x @l_fields; ('?') x @l_fields creates a list of question marks, one for each element in @l_fields.

(See my node on Variable placeholders with DBI.)