in reply to multiple matching in arrays

Please try this. Similar to the answer I had posted for one of your previous question (again related to comparision of arrays)
my @result_arr; (in_array($_,\@array2)) && (push @result_arr, $_) for (@array1); sub in_array { (($_[0] eq $_) ||($_=~m/$_[0]/)) && return ($_=" ") for(@{$_[1]}); }
Thanks.