In my mind size ought to have been a built-in function, rather than relying solely on implied semantics and contextual hocus-pocus to do its job.
You'll get your wish in perl6 as there will be a method you can use on array objects to tell you how many items are in the array. Last I looked it was called nelems but that may have changed.
As an aside, length is going the way of the dinosaur too. It'll be replaced by routines that are more specific and will give you the number of bytes, characters, graphemes, etc. that are contained within a scalar.
In reply to Re^2: Confused Contexts and wantarray
by duff
in thread Confused Contexts and wantarray
by Dr. Mu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |