Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Answer: How do you clear the screen?

( #18787=categorized answer: print w/ replies, xml ) Need Help??

Q&A > input and output > How do you clear the screen? contributed by cleen

use Term::Cap. use the POSIX module to probe certain features of the terminal.
#!/usr/local/bin/perl use POSIX; use Term::Cap; # General terminal line I/O my $termios = new POSIX::Termios; $termios->getattr; # Extract the entry of the terminal type my $term = Term::Cap->Tgetent( { OSPEED => $termios->getospeed } ); # clear $term->Tputs('cl', 1, STDOUT);

Comment on Answer: How do you clear the screen?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2014-09-18 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls