You could also match against non-zero bytes/characters, i.e. [^\0]. In case of overlap there will be one or more non-zero bytes.
print +(($bv1 & $bv2) =~ /[^\0]/ ? "overlap\n" : "don't overlap\n");
In reply to Re: comparing bit vectors
by almut
in thread comparing bit vectors
by citromatik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |