in reply to Re: Re: Shifting an Array
in thread Shifting an Array
I'm also curious as to how Perl does slices internally if the loop version and the slice version are more or less the same. I'd assumed that a slice becomes an anonymous list, with copies of the original values. Wouldn't that take more time to setup than just iterating through the existing one?But during your iteration, you are assigning as well - so you are making copies as well.
Abigail
|
|---|