Well, technically, doesn't 0..$#array create an (anonymous) array, which reverse then reverses? :)Technically no. The 0..$#array just creates a list from zero to the last index, reverse 0..$#array is the list of indices reversed. So we are not reversing the array, just creating a slice with with reversed indices and assigning that slice to the a slice with all the indices in order. I imagine a built-in array reversal would be more like Ruby's array.reverse! method.
In reply to Re: Re: Re: (OT) Interview questions -- your response?
by Anonymous Monk
in thread (OT) Interview questions -- your response?
by Ovid
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |