Help for this page

Select Code to Download


  1. or download this
    sub improved {
        my $c = ord(1);
        my $temp = join $c, @array2;
        @array1 = grep { -1==index($temp, $c . $_ . $c ) } @array1;
    }
    
  2. or download this
    sub perlfaq {
      my %hash;
      @hash{@array2} = ((undef) x @array2);
      @array1 = grep { not exists $hash{$_} } @array1;
    }