The assignment operator itself happens to be both in scalar and in list context. It produces both a list for the list, and a scalar for the function scalar().No. The assignment operator does the assignment, but it doesn't produce a list. The assignment is the side-effect; the result is a scalar due to the scalar context. Similar to how the ++ in perl -we'print $i++' produces 0 while incrementing $x.
In reply to Re^13: If you believe in Lists in Scalar Context, Clap your Hands
by ysth
in thread If you believe in Lists in Scalar Context, Clap your Hands
by gone2015
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |