http://qs321.pair.com?node_id=569756


in reply to DBI recipes

Regarding the automatic construction of the placeholder list when dealing with insertions:
# ... my @fields = (qw(id name salary)); my $fieldlist = join ", ", @fields; my $field_placeholders = join ", ", map {'?'} @fields;
I personally prefer to avoid the map and play with the repetition operator:
my field_placeholders = join ', ', ('?') x @fields;
But I don't really know if this operator was available back in 2003 :)

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.