why it gets larger from having half of its elements removed.
Because using $#array causes some magic to be attached to the array.
You don't even have to assign to $#array for this to happen, only reference it:
@b = 1 .. 10; print size \@b;;
256
print $#b; print size \@b;;
9
440
And yes, 184 bytes does seem excessive. You'd think that the magic could be stored once and simply referenced for each array using an 4/8-byte pointer.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
In the absence of evidence, opinion is indistinguishable from prejudice.
|