> But this operation means copying an array? Even at return the result 
> from function.
> And if the array and/or length are very big, it will take a long time 
> and CPU usage.
> Or I am wrong?
> 

The gurus will correct me, but as far as I understand we do a splice on the 
initial array, take 100 elements out, deflate the indexes and return those 
100 elements in anonymous array which then gets assigned in the same memory 
cell as the original array deflating the index to 100 and assigning the new 
values. I don't believe there is an intermediate copy of the array anywhere 
in memory, but I might be very wrong :)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to