in reply to Re^4: Perl::Improved Volume 0, Number 0
in thread Perl::Improved Volume 0, Number 0
If indices start at 1, taking a slice till the end of an array can be written as:
The good solution for that imo would be to have the .. and ... operators as in ruby, that is, 3..8 means an inclusive range, but 3...8 means a range including 3 but not including 8.
Update: I say this because I've never seen any good example of using $#{} other than a range ending in it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Perl::Improved Volume 0, Number 0
by hardburn (Abbot) on Aug 30, 2004 at 19:13 UTC | |
by Aristotle (Chancellor) on Aug 30, 2004 at 21:08 UTC | |
by ambrus (Abbot) on Aug 30, 2004 at 19:20 UTC | |
by hardburn (Abbot) on Aug 30, 2004 at 19:25 UTC | |
by Roy Johnson (Monsignor) on Aug 30, 2004 at 19:32 UTC |