Get Terminal Size : Term System Functions Perl

      

use Term::ReadKey;

($widthchars, $heightchars, $widthpixels, $heightpixels) = GetTerminalSize();

print "Your screen is $heightpixels x $widthpixels pixels.";