Help for this page

Select Code to Download


  1. or download this
    Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call
    + didn't work. The COLUMNS and LINES environment variables didn't work
    +. at C:/Strawberry/perl/vendor/lib/Term/ReadLine/readline.pm line 410
    +.
    
  2. or download this
        my ($cols, $lines) = split ' ', (grep { m{^\s*\d+\s+\d+\s}xms } `p
    +owershell -command "&{\$H=get-host;\$H.ui.rawui.WindowSize;}"`)[0];
        $ENV{'COLUMNS'} = $cols;
        $ENV{'LINES'} = $lines;
        print "COLUMNS and LINES are set ($cols,$lines).\n";