print "\e[H"; # Put the cursor on the first line print "\e[J"; # Clear from cursor to end of screen print "\e[H\e[J"; # Clear entire screen (just a combination of the above) print "\e[K"; # Clear to end of current line (as stated previously) print "\e[m"; # Turn off character attributes (eg. colors) printf "\e[%dm", $N; # Set color to $N (for values of 30-37, or 100-107) printf "\e[%d;%dH", $R, $C; # Put cursor at row $R, column $C (good for "drawing")