in reply to How do you clear the screen?

use Curses:
use Curses; initscr(); refresh(); #use Curses calls for the rest of your program