Help for this page

Select Code to Download


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