http://www.perlmonks.org?node_id=763548


in reply to complementary array indices

When I was doing this, the @indices array was presorted.
my @arry = qw{ 10 11 12 13 14 15 16 17 18 }; my @indices = qw{ 3 5 1 }; my @remainder = ( 0 .. $#arry ); splice @remainder, $_, 1 for reverse sort { $a <=> $b }@indices; $,=","; print @remainder, $/; __DATA__ 0,2,4,6,7,8,
Be well,
rir