in reply to Re^7: Adding a TAB after a certain ammount of characters
in thread Adding a TAB after a certain ammount of characters
open my $FILE, '<', 'file1.txt' or die "Cannot open file1.txt: $!";
To iterate over the lines of the file, use the diamond operator in a while loop:
You can define the @offs outside the loop because they never change.while (my $text = <$FILE>) { chomp $text; my @cums = (0); # ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Adding a TAB after a certain ammount of characters
by biancoari (Initiate) on Apr 17, 2013 at 17:33 UTC |