in reply to Substitute: for having tabs between the characters
Try
$bar3 =~ s/(.)(?!\z)/$1\t/g;
i.e. for every character except the last one (-> (?!\z)), replace it with itself plus a tab.
(What your substitution would do is remove a trailing tab.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Substitute: for having tabs between the characters
by snape (Pilgrim) on Apr 13, 2010 at 21:20 UTC | |
by GrandFather (Saint) on Apr 13, 2010 at 23:17 UTC |