문제

I have a perl script that is writing to stdout which is a tty. Is there a way to determine how many spaces to a tab on that tty?

도움이 되었습니까?

해결책

You want the 'it' capability from terminfo.

use Term::Terminfo;
my $ti = Term::Terminfo->new; 
$tabsize = $ti->getnum( "it" );
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top