I understand the principle of why it doesn't work. However I maintain that it would not be unlogical to have as a 'last element' identifier a negative number going from the end of the array.
But since perl doesn't actually use the list as array indexing, but to actually build a list, which is then subsequently used to get a slice from the array, this probably won't be possible/easy.
Thanks for all the replies :) It has greatly improved my understanding of slice definitions.
In reply to Re^2: Reasoning behind -1 not working in slices?
by Splutty
in thread Reasoning behind -1 not working in slices?
by Splutty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |