cool, thats great thanks..but how do i assign an incremental variable counter to each values i read per line

i thought i could put a counter in and assign each field value to the incremting var counter but it just returns 1 2 3 4 5 6 7 not the field values!


if open(1,$filename) = 0
$line = readline(1)
while @error = 0
$c=1
$array = split($line,",")
?
for each $field in $array
$var($c) = $field
? "field value is : " $field
? "variable value counter :" $c " holds value : " $var($c)
$c=$c+1
next
$line = readline(1)
loop
$= close(1)
endif


any assitance or pointers would be appreciated