http://qs321.pair.com?node_id=763390


in reply to complementary array indices

If you have Perl 5.10 you can do

use 5.010; my @a = (1, 3, 5); my @b = qw/ 0 x 2 x 4 x 6 7 8 9 /; print @b[grep { not $_ ~~ @a } 0 .. $#b]; __END__ 0246789

lodin