my %hash = map { $_ => 1 } @array; for $search (@listOfScalars) { say '@array contains '.$_ if exists $hash{$_}; }