#!/usr/local/bin/perl -w eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}' if 0; # not running under some shell # $Id: clear,v 1.1.1.1 2001/06/06 08:54:17 sdague Exp $ use Term::Cap; use strict; my $OSPEED = 9600; eval { require POSIX; my $termios = POSIX::Termios->new(); $termios->getattr; $OSPEED = $termios->getospeed; }; my $terminal = Term::Cap->Tgetent({OSPEED=>$OSPEED}); my $cl = ""; eval { $terminal->Trequire("cl"); $cl = $terminal->Tputs('cl', 1); }; print $cl; =head1 NAME clear - clear the screen =head1 SYNOPSIS clear =head1 DESCRIPTION =over 2 Look in the termcap database, find the character to clear the screen, and emit it. This is a direct lift from Section 15.7, B, from I, with C substituted for C. =back =head1 TYPIST Jeffrey S. Haemer =head1 BUGS B should probably take an argument, like B, that will let users send arbitrary termcap sequences, with C as the default. =head1 SEE ALSO Term::Cap(3) =cut