in reply to Re: Getting range from N..end with list slice
in thread Getting range from N..end with list slice
This >perl -E"@a = qw( a b c d e f ); say for @a[4..-1]" would work except for that pesky LHS > RHS returns empty list rule! My friend may be thinking that there is some new syntax like: @a[4..eol], where "eol" is some stand-in for the largest positive index whatever that happens to be. Or alternately some way to determine, not the value at [-1], but the positive index that it would correspond to.
I also wondered if there was some sort of new syntax that would express the idea of "give me everything except the stuff at these particular indicies...", but was unable to find anything like that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting range from N..end with list slice
by AnomalousMonk (Archbishop) on Nov 28, 2010 at 18:42 UTC | |
by ikegami (Patriarch) on Nov 28, 2010 at 23:37 UTC | |
by AnomalousMonk (Archbishop) on Nov 29, 2010 at 00:26 UTC |