in reply to changing a string to a numeric variable

Find out for each $line[x] if it contains only digits and ',' (matching a regex). If that is the case, remove all ',' ( it might contain more than one in e.g. 3,120,000).
pelagic

-------------------------------------
I can resist anything but temptation.