are you _sure_
@CHOICE_B[1 .. $elements_in_array_B] is what you want? Seems like it should be just
@CHOICE_B ...
You can also simplify the whole thing (see
DBI docs) into one line:
my $rv = $dbh->do($Command_B, {}, @CHOICE_B) or die "Couldn't do query
+: ".$dbh->errstr;