Or using grep:
(having checked that the arrays @a and @b are the same length, at least).my $q = '' ; my $i = 0 ; @anew = grep { my $p = $q ; $q = $b[$i++] eq 'z' ; !($p && $q) } @a +;
In reply to Re: delete multiple occurrences
by gone2015
in thread delete multiple occurrences
by coldy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |