in reply to Re^6: Adding a TAB after a certain ammount of characters
in thread Adding a TAB after a certain ammount of characters
This is working GREAT!!!
#!/usr/local/bin/perl use strict; use warnings; use feature 'say'; my $text = q{2013020400000000006810083610022013068100200220130688000200494}; my @offs = ( 17, 6, 31, 3, 3 ); my @cums = ( 0 ); push @cums, $_ + $cums[ -1 ] for @offs; substr $text, $_, 0, q{-} for reverse @cums[ 1 .. $#cums ]; say $text;
Now what is need to do is to modify all the lines of the file, I know that I need to call the file, like this
Am I heading on the right direction?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Adding a TAB after a certain ammount of characters
by choroba (Cardinal) on Apr 17, 2013 at 16:32 UTC | |
by biancoari (Initiate) on Apr 17, 2013 at 17:33 UTC |