in reply to Printing Escape Characters

You'll want to check out the Curses package. It consults a database to look up the appropriate escape codes for your terminal. Also, it'll allow you to deal with screen drawing at a much higher level api.