RE: Last Element Notation
- Posted by Andy Serpa <ac at onehorseshy.com> Sep 17, 2003
- 417 views
> > Unless someone has a better idea, I think I'll go ahead > with this idea of $ meaning "the index of the last element". > e.g. > s[1..$] > s[1..$-1] > s[$-2] > etc. > > I've wanted to do something like this for quite a while, > but I always had the feeling there might be a better way. > Thank God! (and Robert) Great news! It is not hyperbole to say that this simple bit of sugar will cut my development time by hours for most projects...