Hi,
I have a clear screen funciton that I took directly from the Perl Black Book that works fine on one server, but generates this error on another server...
Can't use string ("STDOUT"
as a symbol ref while "strict refs" in use at /usr/local/lib/perl5/5.8.0/Term/Cap.pm line 442.
Here is the code
Any ideas? Or, is there an easier way to clear the screen in a Perl script?
Thanks.
-Tyler
I have a clear screen funciton that I took directly from the Perl Black Book that works fine on one server, but generates this error on another server...
Can't use string ("STDOUT"
Here is the code
Code:
sub cls() {
use POSIX;
use Term::Cap;
$termios = POSIX::Termios->new();
$termios->getattr;
$speed = $termios->getospeed;
$termcap = Term::Cap->Tgetent({TERM => undef, OSPEED => $speed });
$termcap->Tputs('cl', 1, STDOUT);
}
Any ideas? Or, is there an easier way to clear the screen in a Perl script?
Thanks.
-Tyler