$ perl -E ' $s1 = q{gctgc}; $s2 = q{gctcc}; $x = $s1 ^ $s2; say for map sprintf( q{0x%02x}, ord ), split m{}, $x;' 0x00 0x00 0x00 0x04 0x00 $