[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: exists $foo[7] and delete $foo[7]
Tom Christiansen writes:
: Of course I'm serious. Remember, indices aren't keys. They're just
: positions. splice completely removes an entry from an array in a way
: that undef will not, just as delete completely removes an entry from a
: hash the way that undef will not.
I think they're keys. They're just constrained to be numeric as
a very valuable hint for optimization. And in the case of built-in
arrays, determining order. But that doesn't necessarily apply to
tied arrays. A tied array could perfectly validly raise an exception
on a pop().
: Now, could someone please tell me what to fill in for XXXXX?
Slightly more seriously, you draw it without the outer bars, leaving
isolated patches of values, as befits a sparse array:
---------------- ----------------
| | | | | | | |
---------------- ----------------
Larry
- References to:
-
Tom Christiansen <tchrist@chthon.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]