my @xored = map { ord } split //, $str1 ^ $str2; my @anded = map { ord } split //, $str1 & $str2;