Вопрос

есть для perl6 уже что-то, чтобы получить клеммы?

(например, как Perl5 "срок :: readkey :: getterminalsize");

Это было полезно?

Решение

I'm not aware of a direct method, but parsing qx/resize/ should work on systems where the resize command is available.

Update: somewhat golfed parsing code:

my %h = qx/resize/.lines.grep(/\=/).map: { m/(\w+) \= (\d+) /; $/.list };
my ($y, $x) =  %h<LINES COLUMNS>;
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top