I have a text file formatted like this:

computername,garbage,garbage,etc
computername2,garbage,garbage,etc

I need to be able to take the computername before the comma and put it into a variable so i can pass another command...I'm just not sure how to do that...I know how to open the file and readline, but I can't figure out how to only take out the string before the comma and then go to the next line....left() doesn't work since computer name lengths vary.