Terminal size

P

pradeep

Hi all

use Term::ReadKey;
($wchar, $hchar, $wpixels, $hpixels) = GetTerminalSize() ;

use Term::ANSIColor ;

In my perl script these two functions, are working correctly in unix
environment, But these 2 functions gives me error when i use it in
solaris, may i know the perl function for solaris that can be used to
get the terminal size, and function for printing in color

regards
pradeep
 
J

Joe Smith

pradeep said:
Hi all

use Term::ReadKey;
($wchar, $hchar, $wpixels, $hpixels) = GetTerminalSize() ;

use Term::ANSIColor ;

In my perl script these two functions, are working correctly in unix
environment, But these 2 functions gives me error when i use it in
solaris

You can't use those modules unless they have been installed.

/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/Term/ReadKey.pm

Note the "site_perl" part. That means that it was not part of
the core perl distribution, and is something I installed later.

use Term::ReadKey;
use Term::ANSIColor;
($w,$h,$x,$y)=GetTerminalSize();
print color("bold"),$^O,color("reset")," w=$w h=$h x=$x y=$y\n";

solaris w=80 h=46 x=0 y=0

-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,440
Latest member
YoungBorel

Latest Threads

Top