1Text::Tabs(3pm)        Perl Programmers Reference Guide        Text::Tabs(3pm)
2
3
4

NAME

6       Text::Tabs -- expand and unexpand tabs per the unix expand(1) and
7       unexpand(1)
8

SYNOPSIS

10         use Text::Tabs;
11
12         $tabstop = 4;  # default = 8
13         @lines_without_tabs = expand(@lines_with_tabs);
14         @lines_with_tabs = unexpand(@lines_without_tabs);
15

DESCRIPTION

17       Text::Tabs does about what the unix utilities expand(1) and unexpand(1)
18       do.  Given a line with tabs in it, expand will replace the tabs with
19       the appropriate number of spaces.  Given a line with or without tabs in
20       it, unexpand will add tabs when it can save bytes by doing so (just
21       like "unexpand -a").  Invisible compression with plain ASCII!
22

EXAMPLE

24         #!perl
25         # unexpand -a
26         use Text::Tabs;
27
28         while (<>) {
29           print unexpand $_;
30         }
31
32       Instead of the "expand" comand, use:
33
34         perl -MText::Tabs -n -e 'print expand $_'
35
36       Instead of the "unexpand -a" command, use:
37
38         perl -MText::Tabs -n -e 'print unexpand $_'
39

LICENSE

41       Copyright (C) 1996-2002,2005,2006 David Muir Sharnoff.  Copyright (C)
42       2005 Aristotle Pagaltzis This module may be modified, used, copied, and
43       redistributed at your own risk.  Publicly redistributed modified
44       versions must use a different name.
45
46
47
48perl v5.16.3                      2013-03-04                   Text::Tabs(3pm)
Impressum