
Jasmine
Administrator
Jan 19, 2001, 2:47 PM
Post #1 of 1
(3501 views)
|
How do I expand tabs in a string?
|
Can't Post
|
|
(From the Perl FAQ) How do I expand tabs in a string? You can do it yourself: 1 while $string =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e; Or you can just use the Text::Tabs module (part of the standard perl distribution). use Text::Tabs; @expanded_lines = expand(@lines_with_tabs);
|