Another simple(-minded) solution is to just clear the screen before each refresh. You can find the clear string with the following code:
my $clearchr;
if (eval { require Term::Cap }) {
my $terminal = Tgetent Term::Cap { TERM => undef };
$clearchr = $terminal->Tputs("cl");
}
if ($clearchr eq '') {
$clearchr = `clear`;
}
Disclaimer: this will work on Unix, no idea about Windows or other OSes.
|