my %hash; @hash{@arr2}=(1) x @arr2; my @cleaned=grep !$hash{$_},@arr1;