in reply to Re^4: List assignment in scalar context
in thread List assignment in scalar context

Since @x isn't a scalar, it shouldn't affect the count of $n2 because I have scalar = list = list = list

No, you don't. You have scalar = array = list = list, which, as far as the scalar is concerned, reduces to scalar = array, after the array is assigned its value. An array is not a list. The Camel is quite clear on that point. It's also clear on what an array returns in scalar context. No surprises there.

  • Comment on Re^5: List assignment in scalar context