use strict; use warnings; my @control = qw ( 1 2 3 4 5 6 7 ); my $control_num = join ( ',', ('?') x @control ); print "cn=$control_num<<\n"; __DATA__ cn=?,?,?,?,?,?,?<<