lib.modern::Text::Tabs - Online Linux Manual PageSection : 3
Updated : 2023-01-20
Source : perl v5.36.0
Note : User Contributed Perl Documentation

NAMEText::Tabs − expand and unexpand tabs like unix expand(1) and unexpand(1)

SYNOPSIS​ use Text::Tabs; ​ ​ $tabstop = 4; # default = 8 ​ @lines_without_tabs = expand(@lines_with_tabs); ​ @lines_with_tabs = unexpand(@lines_without_tabs);

DESCRIPTIONText::Tabs does most of what the unix utilities expand(1) and unexpand(1) do. Given a line with tabs in it, \*(C`expand\*(C'\fR replaces those tabs with the appropriate number of spaces. Given a line with or without tabs in it, \*(C`unexpand\*(C'\fR adds tabs when it can save bytes by doing so, like the \*(C`unexpand \-a\*(C'\fR command. Unlike the old unix utilities, this module correctly accounts for any Unicode combining characters (such as diacriticals) that may occur in each line for both expansion and unexpansion. These are overstrike characters that do not increment the logical position. Make sure you have the appropriate Unicode settings enabled.

EXPORTSThe following are exported: expand unexpand $tabstop The $tabstop variable controls how many column positions apart each tabstop is. The default is 8. Please note that local($tabstop) doesn't do the right thing and if you want to use \*(C`local\*(C'\fR to override \f(CW$tabstop\fR, you need to use ​local($Text::Tabs::tabstop).

EXAMPLE​ #!perl ​ # unexpand −a ​ use Text::Tabs; ​ ​ while (<>) { ​ print unexpand $_; ​ } Instead of the shell's \*(C`expand\*(C'\fR command, use: ​ perl −MText::Tabs −n −e 'print expand $_' Instead of the shell's \*(C`unexpand \-a\*(C'\fR command, use: ​ perl −MText::Tabs −n −e 'print unexpand $_'

BUGSText::Tabs handles only tabs ("\t") and combining characters (\*(C`/\epM/\*(C'\fR). It doesn't count backwards for backspaces ("\t"), omit other non-printing control characters (\*(C`/\epC/\*(C'\fR), or otherwise deal with any other zero−, half−, and full-width characters.

LICENSECopyright (C) 1996−2002,2005,2006 David Muir Sharnoff. Copyright (C) 2005 Aristotle Pagaltzis Copyright (C) 2012−2013 Google, Inc. This module may be modified, used, copied, and redistributed at your own risk. Although allowed by the preceding license, please do not publicly redistribute modified versions of this code with the name "Text::Tabs" unless it passes the unmodified Text::Tabs test suite.
0
Johanes Gumabo
Data Size   :   9,540 byte
man-Text::Tabs.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 183,219
Visitor ID   :     :  
Visitor IP   :   3.144.15.34   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Text::Tabs.3pm|24/25|el══─{─══.|.el══─{─══. ds C` )         (htmlprn|149|Text::Tabs.3pm|24/25|.el══─{─══. ds C` |.el══─{─══. ds C` )         (parse_manual_page_|249|Text::Tabs.3pm|27|br══─}─══|'br══─}─══ )         (htmlprn|149|Text::Tabs.3pm|27|'br══─}─══ |'br══─}─══ )         (rof_escape_sequence|91|Text::Tabs.3pm|77|\*(C`expand\*(C'\fR replaces those tabs with |do. Given a line with tabs in it, \f(CW\*(C`expand\*(C'\fR replaces those tabs with )         (rof_escape_sequence|91|Text::Tabs.3pm|79|\*(C`unexpand\*(C'\fR adds tabs when it can save bytes by doing so, |it, \f(CW\*(C`unexpand\*(C'\fR adds tabs when it can save bytes by doing so, )         (rof_escape_sequence|91|Text::Tabs.3pm|80|\*(C`unexpand \-a\*(C'\fR command. |like the \f(CW\*(C`unexpand \-a\*(C'\fR command. )         (rof_escape_sequence|91|Text::Tabs.3pm|103|\*(C`local\*(C'\fR to override \f(CW$tabstop\fR, you need to use |to use \f(CW\*(C`local\*(C'\fR to override \f(CW$tabstop\fR, you need to use )         (rof_escape_sequence|91|Text::Tabs.3pm|117|\*(C`expand\*(C'\fR command, use: |Instead of the shell's \f(CW\*(C`expand\*(C'\fR command, use: )         (rof_escape_sequence|91|Text::Tabs.3pm|123|\*(C`unexpand \-a\*(C'\fR command, use: |Instead of the shell's \f(CW\*(C`unexpand \-a\*(C'\fR command, use: )         (rof_escape_sequence|91|Text::Tabs.3pm|130|\*(C`/\epM/\*(C'\fR). It doesn't |Text::Tabs handles only tabs (\f(CW"\et"\fR) and combining characters (\f(CW\*(C`/\epM/\*(C'\fR). It doesn't )         (rof_escape_sequence|91|Text::Tabs.3pm|131|\*(C`/\epC/\*(C'\fR), |count backwards for backspaces (\f(CW"\et"\fR), omit other non-printing control characters (\f(CW\*(C`/\epC/\*(C'\fR), )