"Sputnik" help  
Sputnik Help
Language Reference - Operators - Operator [^] (Index From End)

Operator [^]

Index From End. e.g.

$arr = qw(one two three four);
say $arr[^1];
say $arr[^2];

$arr = qw(0 10 20 30 40);
say $arr[^1];
say $arr[^2];

$arr = "Cat";
say $arr[^1];
// PRINTS
// four
// three
// 40
// 30
// t

Rather than a normal index value this one obtains items from the size minus the index you request.

It can be used on Strings/Arrays/Classes etc.

See the Magic Class functions GetFromEnd and SetFromEnd.

To see a list of all the operators go here.


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org