Determine the height and width of the terminal, and store this information into variables for subsequent use.

var stty = `stty -a`;
var lines = stty.match(/\brows\h+(\d+)/);
var cols  = stty.match(/\bcolumns\h+(\d+)/);
say "#{lines} #{cols}";