in reply to Re: Remove array elements dynamically!
in thread Remove array elements dynamically!

... since each splice needs to copy all the elements from $i to the end of the array.

Is that so? I always thought of splice being highly efficient, working "in-place", just "re-arranging elements", without need to copy anything. Can you ascertain your statement?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re^2: Remove array elements dynamically!

Replies are listed 'Best First'.
Re^3: Remove array elements dynamically!
by Joost (Canon) on Aug 27, 2007 at 20:11 UTC