for (split //, $template) { print ord == 0 ? '.' : 'X'; } print "\n";
Another way to do that:
$template =~ tr/\0/X/c; $template =~ tr/\0/./; print "$template\n";
But this looks like it produces the output the OP wants:
print "position $-[0] is not conserved\n" while $template =~ /[^\0]/g;
In reply to Re^2: manipulating alignment data
by jwkrahn
in thread manipulating alignment data
by AWallBuilder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |