my $xx = $Variable+($Component_number*$Variable); $Command = join(' ', 'EXEC', $SPROC, join(', ', @CHOICE[1 .. $xx]).';';