home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Perl CookbookPerl CookbookSearch this book

15.3. Clearing the Screen

15.3.3. Discussion

If you clear the screen a lot, cache the return value from the termcap or clear command:

$clear = $terminal->Tputs('cl');
$clear = `clear`;

Then you can clear the screen a hundred times without running clear a hundred times:

print $clear;

15.3.4. See Also

Your system's clear(1) and termcap(5) manpages (if you have them); the documentation for the standard module Term::Cap module, also in Chapter 32 of Programming Perl; the documentation for the Term::Lib module from CPAN



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.