in reply to Only joining elements of an array that are defined

$cmd = join(' ', 'EXEC', $SPROC, join(', ', grep { defined $_ } @CHOICE));

Updated.