sub differing_positions { my @c = unpack('C*', $_[0] ^ $_[1]) ; return grep $c[$_], (0..$#c) ; }