my $clear=`/path/to/clear`; # and then whenever you want to clear the screen- print $clear;