Csh reading lines

Hi,
I have been trying to do a little script in Csh, to classify some information of a text document.
My problem appears when i have to calssificate two parts of the same line into different variables, for example in the document appears something like that:

ID NAME
999999,Michel Luka
888888,Lara Croft

In my scrypt, im trying to take first the ID to save it into a variable and second the NAME to save it in another variable, the only thing that i know is that with the code:

#!/bin/csh

foreach line ( "`cat login.dat`" )
    echo $line
    echo $line | cut -d "," -f 1
    echo $line | cut -d "," -f 2
end

i get printed the two parts, but dont know how to save each part in different variables to do:

echo $ID and $NAME

Thanks, and sorry for my english, today im a bit thick :confused:

#!/bin/csh

foreach line ( "`cat login.dat|grep -v ID`" )
    set ID=`echo $line | cut -d "," -f 1`
    set NAME=`echo $line | cut -d "," -f 2`
    echo "$ID // $NAME"
end

csh-programming-considered-harmful

For non csh

IFS=","
while read ID NAME
do
    echo $ID
    echo $NAME
done<login.dat

HINT: Either seperate the headings as well with a "," or change to done<login.dat|grep -v ID or foreach line ( "`cat login.dat|grep -v ID`" ) accordingly.

Hope this helps