use Term::ANSIScreen qw/:screen/; my ($width, $height) = GetTerminalSize ();