in reply to for loops and 'and'

Just reread your comment about "In real code". If you have an array instead of the 1..10, the ternary operator is the way to go. print for @a ? @a : 1..11 will have the first @a in scalar context (hence checking if there are any elements in the array) and the second @a in list context, returning the elements of the array. The 1..11 will properly have list context and generate the list (1,2,...,11).

Array slices are different. They don't have a scalar context per se; if scalar context is imposed (i.e. by being the first operand to ?:) the last element of the slice will be returned (and checked for truth by ?:). So assuming your desired-but-not-working-as-is-code was print for @a[@indices] or 1..11 you need to decide what you mean to do by checking @a[@indices] for truth. That could be any of a number of things. Perhaps one of these would be what you meant:

print for grep($a[$_], @indices) ? @a[@indices] : 1..11; print for grep(defined $a[$_], @indices) ? @a[@indices] : 1..11; print for grep(exists $a[$_], @indices) ? @a[@indices] : 1..11; print for !grep(!$a[$_], @indices) ? @a[@indices] : 1..11; print for !grep(!defined $a[$_], @indices) ? @a[@indices] : 1..11; print for !grep(!exists $a[$_], @indices) ? @a[@indices] : 1..11; # update: actually use slices after ?
I.e. use the array if (any/all) of the elements are (true/defined/existing), otherwise fall back on 1..11.