http://www.perlmonks.org?node_id=696521


in reply to How to re-print multiple lines?

The following node contains plenty of alternatives on how to do this: How to UPDATE rather than append to STDOUT?.

Update:
hmmm... I was too fast, most proposals cannot handle multiple scrolls...
But in case you can manage to install Term::Screen on your system, you can easily implement what you want!