in reply to How do I get my ascii tile code to refresh without looking weird

If you're on a ANSI compatible terminal, see http://www.termsys.demon.co.uk/vtansi.htm for the details.

The simplest way would be to just clear screen and set the cursor to top-left before each redraw:

print "\x1b[2J\x1b[0;0H"; # erase screen, set cursor to top left
You may be able to find more efficient techniques by modifying only the parts of the screen that have changed.

See also Term::Screen, Curses and lots of other stuff you can find on cpan searching for ANSI. and Term.

  • Comment on Re: How do I get my ascii tile code to refresh without looking weird
  • Download Code