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