in reply to Confused as to why the "casting context" is mis-behaving
Interesting and surprising.
DB<1> @a = qw( a b c d e ) DB<2> x @a[1,3] 0 'b' 1 'd' DB<3> x scalar @a[1,3] 0 'd' DB<4>
In my mind, the 'scalar' applies to the result of the slice, but obviously it 'reaches into' the subscripting square brackets to create a slice of the rightmost subscript.
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Confused as to why the "casting context" is mis-behaving
by tinita (Parson) on Oct 20, 2010 at 15:58 UTC | |
|
Re^2: Confused as to why the "casting context" is mis-behaving (not distributed inside)
by tye (Sage) on Oct 21, 2010 at 14:26 UTC |