in reply to How to restart a while loop that is iterating through each line of a file?
As a side note, also note that when you're reading from a file handle, the $. special variable contains the number of the file line being read, so that you don't really need the $count variable, you can just check $. to stop your while loop.
Finally this line:
might be written simpler as:for (my $i=0; $i<=33; $i++) {
for my $i (0..33) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to restart a while loop that is iterating through each line of a file?
by BillKSmith (Monsignor) on Nov 29, 2016 at 03:32 UTC |