in reply to Re: Emptying (and refilling) an array.
in thread Emptying (and refilling) an array.
Thanks for the critique: I've updated my benchmarks with something hopefully a little better.
Yes, I was thinking of undef @working. Fixed.
I kept meaning to get those off-by-one errors matched up, but I knew it didn't actually make a difference... My bad.
$#working = 100; actually isn't part of what I was looking at: I was specifically looking at an array that (usually) already has a length.
my @working; is the same as my @working = (); when @working doesn't exist. Once it does, the latter does seem to actually clear the array. (As far as I can tell: My code that should throw errors if it didn't.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Emptying (and refilling) an array.
by ikegami (Patriarch) on Jan 12, 2009 at 16:38 UTC | |
|
Re^3: Emptying (and refilling) an array.
by JavaFan (Canon) on Jan 12, 2009 at 16:43 UTC |