On 03/20/2017 11:18 PM, Norman Gaywood wrote:
On 21 March 2017 at 15:39, ToddAndMargo <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote: from the beginning of an array? untested but same as perl5: splice @list, 0, $N; https://docs.perl6.org/routine/splice <https://docs.perl6.org/routine/splice> I know about shift, but that is one at a time. I suppose I could do a loo[, but it would be nice to do it all at once. Many thanks, -T
Hi Norman, That was easy. Thank you! -T perl6 -e 'my @foo = <a b c d e f g>; @foo.splice(0,3); say @foo;' [d e f g] @foo.splice(1,3); say @foo;' [a e f g] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Computers are like air conditioners. They malfunction when you open windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~