in reply to Confused as to why the "casting context" is mis-behaving

@a[3,1] is an array slice, and an array slice is effectively the same as ($a[3], $a[1]), which is the comma operator.
and if the comma operator is called in scalar context it returns the last expression, $a[1].