On Wed Apr 08 14:59:19 2009, moritz wrote: > 23:55 <@moritz_> rakudo: my @a = 1..4; say @a[1..*].perl > 23:56 < p6eval> rakudo 6b9755: OUTPUT«[2, 3, 4, undef]» > > It should just be [2, 3, 4].
Since the discussion came up on #perl6 if this is really the expected behaviour, S09 says: As the end-point of a range, a lone "whatever" means "to the maximum specified index" (if fixed indices were defined): say @calendar[5..*]; # Same as: say @calendar[5..11] say @calendar{Jun..*}; # Same as: say @calendar{Jun..Dec} or "to the largest allocated index" (if there are no fixed indices): say @data[1..*]; # Same as: say @results[1..5] It doesn't mention how the postcifcumfix:<[ ]> is supposed to introspect those to find out if the WhateverCode object constructed by 1..* needs to receive self.elems or self.elems-1 as an argument. Which is why I CC: p6l to get some ideas or clarification, and if we want to maintain this DWIMmy but not very consistent behaviour. Cheers, Moritz