Perl : 3 Ways to Clear Screen Cross-Platform

1. Use : Term::Screen:Uni

require Term::Screen::Uni;
my $scr = new Term::Screen::Uni;


2. Use : Term::ANSIScreen

use Term::ANSIScreen qw(cls);

3. Use : this method does not require the user to install some cpan module!

print "\033[2J"; #clear the screen
print "\033[0;0H"; #jump to 0,0


Published by


Ayutthaya Technical College/Voc.Cert.🛠️ | KMUTNB/B.S.Tech.Ed.⚙️ | Information Security Engineer 👨🏻‍💻| Penetration Tester👨🏻‍💻 | COYG🔴 Milan🔴⚫️ | Taylor Swift👩‍🎤 | ติ่งซีรีส์ญี่ปุ่น 🇯🇵

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.