use strict; use warnings; my @a=("qwert","as","z"); $| = 1; for (0..2) { print "\e[1J\e[H"; print"$a[$_]"x100; sleep(1); } print "\n"; #### \e[1K - clear from cursor to beginning of the line \r - goto beginning of the line \e[1J - clear from cursor to beginning of the screen. \e[H - Moves the cursor to top left corner