It seems you are combining two independent things:
- The operator is evaluated in a list, scalar or empty context.
- The operator decides in which context its operands are evaluated.
Reverse operands are always evaluated in the context of the list.
reverse LIST
So, <STDIN> will be evaluated in the context of the list.
Like all operators that can return something other than a scalar, reverse behaves differently in a scalar context and in a list context.
The print operands are always evaluated in the context of the list.
print LIST
So reverse will be evaluated in the context of the list. This means that he will change the order of his operands. It will not reverse the character order of each operand, and it will not concatenate the list.
source share