Help for this page
for (reverse 0 .. $#a) { splice @a, $_, 1 if condition($a[$_]); }
my (%a, %b); @a{@a} = (); @b{@b} = (); ... # or if order matters, # @a = grep {exists $a{$_}} @a; # @b = grep {exists $b{$_}} @b;