Is it possible to create an array with conditional items?
my @a = (1, ($condition) ? 2 : \"no-op\", 3);
Such that \"no-op\" is fu
\"no-op\"
You can use empty list () to skip second element,
()
my @a = (1, ($condition ? 2 : ()), 3);