Hi All
my problem is one of progam concept, a data file is as below, my code (which
is not doing
what I want it to do is below)
I want to parse a file with a known 3 blank lines to number 1, then for each
other
number it could be either 3 or 4 blank lines. Each number has to be checked
to see
it's valid ie in sequence, and the next number follows with again a 3 or 4
increment
Has anyone got any ideas on how I could get this code to work ??? I am
stumped ...
thanks
Steve
code
=======
$z=1;
$First = 3;
$inc = 0;
while ($z <= 4){ ## 4 signifies
expected count in data file
if($source[$First+($inc*$z)] =~ m/^$z/){
$inc = $First+($inc*$z);
} elsif ($source[$First+1+($inc*$z)] =~ m/^$z/){
$inc = $First+1+($inc*$z);
}
$z++;
}
=======
data
3 blank lines- 1, 3 blank -2, 4 blank-3, 3 blank -4
=======
start line 1
1
2
3
4
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]