in reply to Re^3: Adding a TAB after a certain ammount of characters
in thread Adding a TAB after a certain ammount of characters
Please show us your perl1.pl script inside <code> and </code> tags so we can see where you are going wrong. As for working on a multi-line file, calculate the offsets, open your file then do something like
while ( <$inputFH> ) { foreach my $offset ( reverse @cums[ 1 .. $#cums ] ) } substr $_, $offset, 0, q{-}; } print; }
I hope this moves you forward.
Update: Code modified to replace for statement modifier with an explicit loop, thanks choroba.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Adding a TAB after a certain ammount of characters
by biancoari (Initiate) on Apr 17, 2013 at 12:09 UTC | |
by hdb (Monsignor) on Apr 17, 2013 at 12:11 UTC | |
by choroba (Cardinal) on Apr 17, 2013 at 12:33 UTC | |
by biancoari (Initiate) on Apr 17, 2013 at 16:04 UTC | |
by choroba (Cardinal) on Apr 17, 2013 at 16:32 UTC | |
by biancoari (Initiate) on Apr 17, 2013 at 17:33 UTC |