R
Ronald Fischer
Given an array @x, what is the most elegant way to get a slice from index $n to the end of the array?
My first attempt was @x[$n .. -1] failed - probably because the
... operator found that the rhs value was already lower than the
lhs value and hence produced an empty range.
I ended up with @x[$n .. $#x], which is not that bad, but maybe someone
can come up with a better solution?
Ronald
My first attempt was @x[$n .. -1] failed - probably because the
... operator found that the rhs value was already lower than the
lhs value and hence produced an empty range.
I ended up with @x[$n .. $#x], which is not that bad, but maybe someone
can come up with a better solution?
Ronald