OK for any people who are having similar problems with reading in data I now have the answer to my problem. I was trying to use a "file.txt" that I had copied from a different project.
Maybe,
This resulted in a newline character error.
I don't think that was the problem.
I just changed the newline to CR in my example "A6.txt" file, and lloyddean's posted code works fine with no changes. It also works fine with CR-LF line-endings. For example, space-separated or tab-separate input lines would work identically. It even works if you mix the different forms in the same input file:
Code:
April,Joe 3120 12
Matthews,Jocob 4592 39
Garfield,Kitty 8917 33
Lake,Bill 2233 21
Jones,Betty
8912
18
Something else was going wrong, but unless you post the exact file you were using, and exactly how you were running the command, it's impossible to figure out the reason for the malfunction. If you don't want to pursue this any further, that's fine.