Sep 21, 2012, 9:31 AM
Post #4 of 4
Lynn, there might still be a small error in the code after the correction suggested earlier.
for ($l = 0; $l<=$RUNS; $l++)
looks like a possible error because if $RUNS equals 10, you will run 11 tiBesides mes through the for loop, which is likely to be different from what you want.
Besides, on a purely stylistic point of view, you might consider a more "perlish" syntax.
The code above is better rewritten as:
or, better (but no longer exactly equivalent):
as it is simpler and more idiomatic and it runs faster (it is equivalent to the above, so it has the same bug if your code had the possible I mentioned.
In fact, since you do not seem to use $l in your loop, it could be even further simplified by dropping $l altogether:
(This post was edited by Laurent_R on Sep 21, 2012, 9:35 AM)