use Win32::CONSOLE::ANSI; # (This is only required in Windows) print "\e[H\e[J\n"; # Escape-H "homes" the cursor # Escape-J clears to end-of-screen