in reply to Re: Plot Graph in Console by printing special character say * and spaces using matrix structure in Perl
in thread Plot Graph in Console by printing special character say * and spaces using matrix structure in Perl

I found the alternative of `stty size` on Linux for windows console size. Just a simple perldoc -q "screen size" revealed following:

How do I get the screen size? If you have Term::ReadKey module installed from CPAN, you can use it to fetch the width and height in characters and in pixels:

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

The code is working though I will modify it. Thanks for giving me a start!!
  • Comment on Re^2: Plot Graph in Console by printing special character say * and spaces using matrix structure in Perl

Replies are listed 'Best First'.
Re^3: Plot Graph in Console by printing special character say * and spaces using matrix structure in Perl
by Anonymous Monk on Sep 10, 2022 at 10:30 UTC

    $hchar is clearly reported 1 less than it should be, on Windows. Ah yes, see line 506