Again, I know *what* is happening. The question is *why*. Why does requesting an non-existing array element return undef and requesting an non-existing list element return nothing.
I have tried to avoid using the term "array" or "list" for these @vars. I remain curious as to when @var is an array and when @var is a list.
@var is an array. It evaluates to a list in list context, just like every other operator.
In reply to Re^3: Array/List Strangeness
by ikegami
in thread Array/List Strangeness
by Manchego
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |