in reply to Re^12: If you believe in Lists in Scalar Context, Clap your Hands
in thread If you believe in Lists in Scalar Context, Clap your Hands
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^14: If you believe in Lists in Scalar Context, Clap your Hands
by mr_mischief (Monsignor) on Oct 28, 2008 at 14:02 UTC | |
by ysth (Canon) on Oct 28, 2008 at 18:37 UTC | |
by mr_mischief (Monsignor) on Oct 28, 2008 at 18:44 UTC | |
by ysth (Canon) on Oct 28, 2008 at 19:06 UTC | |
by ikegami (Patriarch) on Oct 28, 2008 at 21:07 UTC | |
| |
by mr_mischief (Monsignor) on Oct 28, 2008 at 19:27 UTC |