Use the octal button "\ r" or "\ 015" (otherwise "Return caret" aka " " Carriage Return ", originating from the days of a typewriter:)
> perl5.8 -e 'print "11111\r222\r3\n";' 32211 > perl5.8 -e 'print "11111\015222\0153\n";' 32211
Just remember to print at least as many characters as the longest line already printed to overwrite all old characters (as you can see in the example above, discarding it will contain old characters).
Another thing to be aware of is, as Michael pointed out in the communique, to enable autorun while these prints occur, so that the output does not wait for a newline at the very end of processing.
UPDATE: Please note that in the third answer 03, the eighth character is a vertical tab:
> perl5.8 -e 'print "11111\013222\0133\n";' 11111 222 3
DVK
source share