Finding out how many spaces a tab character is expended to

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Mon Oct 29 09:27:24 UTC 2007


John McGregor wrote:
> According to this document, the default no. of spaces for tab in Perl is
> 4 (line 141), but other references I saw in a cursory search for
> 'default  number of spaces for tab in perl'  showed that the default is
> 8 or that it is arbitrary.
> 
> http://search.cpan.org/src/DMUEY/Text-InHTML-v0.0.3/lib/Text/InHTML.pm
> 
> John

Hi,

   This isn't so much a perl question as it is a terminal question. The 
program is perl, but I am more interested in what the user's 
shell/terminal is doing. Ie: How can I ask the terminal, "Hey, how many 
spaces do you expand a tab to?". Like how you can use the shell program 
'tput' to ask the shell how many columns a current line has.

Madi
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list