Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-11-25 21:41 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (691 votes), past polls