Thanx for the help Richard. I wrote those ',,,,' to my split and I'm not getting the error anymore. It's hard to go from an easy language like PHP to scripting language where you have to do more things by yourself.

I'm still having problems with my readline but I think I just got dropped on my head or something because now that i know the error is -1 on my readline() function, i know it has something to do with maybe only being able to loop through the file once without closing and reopening it again or something...