Hello saint_geser, and welcome to the Monastery!
In addition to the modulus problem highlighted by Anonymous Monk, above (and ignoring the fact that the code snippet you gave doesn’t compile!), there is a problem with the following line:
open (TEMP, '>', $temp) or die Lava::Message("Can't open temporary fil +e");
This occurs within the outer while loop, so on each iteration, whenever the if condition succeeds, the temp file is truncated (“clobbered,” erased) as it is re-opened for output. See open.
Move the open statement to before the loop, so it is executed only once.
Hope that helps,
Athanasius <°(((>< contra mundum
In reply to Re: Parsing CSV only returns the second line of the file
by Athanasius
in thread Parsing CSV only returns the second line of the file
by saint_geser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |