in reply to Re^4: If you believe in Lists in Scalar Context, Clap your Hands
in thread If you believe in Lists in Scalar Context, Clap your Hands
Is the "operators provide context to their operands" pattern of thought really what all programmers are doing when they program in Perl, or is it something perl does for them so they don't have to worry about it?
Well, perl provides the context (to the operands), but it's something programmers have to consider. But that's not any different then that in $a + $b, perl does the addition, but the programmer has to consider the result, and realize that it's usually different from $a * $b.
Context is an integral part of Perl programs. perl will do the handling behind the screens, telling each operator/function which context it is in - but it's the programmer who has to consider the difference between having the operator/function in the various contexts in can be in.