@_ is a list so assignment in a scalar context will get you the length of the list
I think the distinction between list and array is important here. An array in scalar context returns its length, a literal list in scalar context returns its last element. @_ is an array.
In reply to Re^2: Length of Array Passed as Reference
by haukex
in thread Length of Array Passed as Reference
by Leudwinus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |