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 th开发者_开发知识库at tty?
You want the 'it' capability from terminfo.
use Term::Terminfo;
my $ti = Term::Terminfo->new;
$tabsize = $ti->getnum( "it" );
精彩评论