$template =~ tr/\0/X/c; $template =~ tr/\0/./; print "$template\n";