Notice that a slice in scalar context acts like a list (returning the last element), not like an array (returning the number of elements):
# perl -le '@a=(1..9); print scalar @a[2,6,5]' 6
In reply to Re: Referencing Array Slices as Lists?
by takshaka
in thread Referencing Array Slices as Lists?
by BBQ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |