質問

は、Perl6のためにすでに端末サイズを取得するものですか?

(たとえば、Perl5 "Term :: 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