in reply to Re^2: manipulating alignment data
in thread manipulating alignment data

infix ^ is the bitwise XOR operator, so the resulting string from $first ^ $_ has a zero-byte at every position where $first and $_ are equal.

Likewise | is the bitwise OR operator, so $template accumulates non-zero bytes at any character position where any row differed from $first.

print ord == 0 ? '.' : 'X';

ord == 0 simply checks if $_ is the zero-byte. If yes, a dot is returned, otherwise an X.

For more information look into perlop, search for "bitwise" and "ternary".