in reply to Using || operator with arrays

perlop hints at the reason for this when it says
That is, if the left operand is true, the right operand is not even evaluated. Scalar or list context propagates down to the right operand if it is evaluated.
In other words, the left operand is evaluated in boolean context, which is a special case of scalar context. So in your first example that value is 20, a true value, and in the second example it is undef, a false value. If this value is true, it becomes the value for the full expression, as in the first example. If it is false, then the value of the second expression is taken, but it is evaluated in the context of the surrounding expression, which is list context since print is a list operator.