Perl : 3 Ways to Clear Screen Cross-Platform

1. Use : Term::Screen:Uni

require Term::Screen::Uni;
my $scr = new Term::Screen::Uni;
$scr->clrscr()

^
^
$scr->clrscr()

2. Use : Term::ANSIScreen

use Term::ANSIScreen qw(cls);
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

Cr. http://stackoverflow.com/questions/197933/whats-the-best-way-to-clear-the-screen-in-perl

Published by

sornram9254

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.