in reply to Re^2: Slicing an array variable with a -1 or any negative number doesn't work
in thread Slicing an array variable with a -1 or any negative number doesn't work
-1 or other -x (negative numbers) in slices, can only work with commas, but not with ..
Nope. The point is that ".." counts up. These work:
@letters = ('a'..'z'); say for @letters[-5..-1]; say for @letters[reverse(-1..0)];
|
|---|