my $in; $in .= '?, ' for @ins; # discard hanging comma $in =~ s/, $//; #### my $in = join ', ', ('?') x @ins;