in reply to How do I replace \t and regarding to the alignment requirement ?
I'm sure it can be done with a closed formula instead of a lookup table, but this was faster coding.my @l = (0, 7, 6, 5, 4, 3, 2, 1); $str =~ s/\G([^\t]*)\t/$1 . (' ' x $l[length($1) % 8])/eg;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I replace \t and regarding to the alignment requirement ?
by PerlOnTheWay (Monk) on Apr 19, 2012 at 14:20 UTC | |
by JavaFan (Canon) on Apr 19, 2012 at 14:26 UTC | |
by PerlOnTheWay (Monk) on Apr 19, 2012 at 14:28 UTC | |
by JavaFan (Canon) on Apr 19, 2012 at 14:30 UTC | |
| |
by Anonymous Monk on Apr 19, 2012 at 14:23 UTC |