The problem is not about what happens, which is eminently described by your rules.
The problem is how to discuss what happens and why, without complex ascii-art diagrams, or multiply subscripted essays, for the two common results of symbolic (source code) expressions that appear (conceptually) to produce multiple values, when those constructs occur (directly or indirectly) in a scalar context. Namely:
@a = 'a'..'d';; print @a;; a b c d print scalar @a;; 4
print('a'..'d');; a b c d print scalar ('a','b','c','d');; d
In the context of the original thread, the question was asked: Why does a slice @a[0..$#a] produce a different result in a scalar context to the array, when they both produce identical results in a list context. (Or meaning to that effect.)
And the reply (with licence), that started this discussion, was: Because a slice acts like a list in a scalar context.
The problem that arises is that people, (those in the know), will insist on taking that use of the word 'list' to mean some ethereal, maybe-exists or maybe-doesn't, internal state; rather than the more general, more useful, concrete concept of what has (in at least one post) been alternatively named a 'list constant'.
So, in order to be able to discuss and relate to discussion, and to be able to categorise the effects of the many constructs in a scalar context, the following two phrases might be used to relate any given expression to the well known and broadly understood situations in 1 & 2 above:
And those two wordy (and I hope inarguably accurate:), phrases should be replacable by:
In turn, if people would accept that in the context[sic] of posts like the one that started this saga, that the term 'list' is most likely to mean the concrete variety, rather than the nebulous, ethereal source divers-only meaning, then the phrase "It acts like a list in a scalar context", is a simple, convenient and conceptually accurate way of describing what happens when (for example), an array slice expression appears in a scalar context.
For me, the crux of this whole saga is that attempt by certain somebodies to infer a meaning from the use of the term 'list' that simple doesn't appear on the horizons of most SoPWs; nor even the greater majority of Perlers. And then jump on people because of that (wrong) inference.
In reply to Re^18: If you believe in Lists in Scalar Context, Clap your Hands
by BrowserUk
in thread If you believe in Lists in Scalar Context, Clap your Hands
by gone2015
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |