in reply to array issue

Well sure it gives you the rest of the junk ... that's what you asked for:

while lines in file if line begins with '-- NAME:' and space followed by words split line on space and add to name array

You're going to have to get rid of the junk - either before you split (ala split on ':', then split on space. Or splice the array if you now the first two items are always going to contain junk.

-derby