Perl: the Markov chain saw | |
PerlMonks |
Re^2: Length of Array Passed as Referenceby haukex (Archbishop) |
on Dec 10, 2020 at 09:16 UTC ( [id://11124934]=note: print w/replies, xml ) | Need Help?? |
@_ 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 Section
Seekers of Perl Wisdom
|
|