$s = "The\tquick\tbrown\tfox\tjumps\tover\tthe\tlazy\tdog";; print $s;; The quick brown fox jumps over the lazy dog ($t=$s); 1 while $t =~ s[(\t)]{ '.' x ( 8 - ( $-[0] % 8 ) ) }e; print $t;; The.....quick...brown...fox.....jumps...over....the.....lazy....dog