Looking at that code, it doesnt appear that there is anything wrong with it on the surface..
I would suggest that you show us the data comming in, and comming out...
you might also want to throw some print statements in there which always help to find the problem.. ie-
foreach(@class)
{
($id, $name, $credits) = split(/,/, $_);
$x=0;
while ($clen > $x)
{
print "COURSE: ->$course[$x]<- IE: ->$id<-$/";
if ($course[$x] eq $id)
{
$z++;
}
$x++;
}
}
in there so you can verify that your data is really what you think it is..
Good Luck!
UPDATE: chromatic made the excellent suggestion that I add something around to vars Im printing to check for white space, YATS (yet another time saver)
.mincus
telnet://bbs.mincus.com