foreach my $element(@array1) { #I want to check if the value exists in @array2 #Any smart ways to deal with this? #This looks bad... foreach my $another_element(@array2) { if ($element eq $another_element) { print "Hey...\n"; } } }