why does this script read every other line of a file that goes on and on like this?
script:
#!/usr/bin/perl
open(LIST, ">newlist.lst") or die; #the new classlist
select(LIST); #select the newlist for output
while (<>) {
@chunks = split(/\",\"/ , <>); #split the lines at ","
print $chunks
5 , " , " , $chunks
6 ," , ", $chunks
7," , , , ",$chunks
4 ," , ", $chunks
4 , " , , " ,unpack("A1",lc($chunks
7)),lc($chunks
6), "\n";
}
close(LIST); #we're done!
file:
"2000","A","AMS","151","01","052708224","Amoroso","Jason"," ","CSE"," "," "," ","U1"," ",3.0
"2000","A","AMS","151","01","107723030","Aprea","Stephen","V","GEN"," "," "," ","U1"," ",3.0
88 students in, 44 out
it reads in one format of classlist and outputs another. other than the skipping lines, everything works fine, but if anyone has any suggestions feel free to post them
-thanks
-Lucas