unless (exists { map { $a[$_].$b[$_] => $_ } 0..$#a }->{$a.$b}) { do_something(); }