in reply to Re^2: Why do i get an extra (duplicate) array element?-
in thread Why do i get an extra (duplicate) array element?-

If you could show us an actual data line(s), then most likely other techniques than substr() could be used. Split with an array slice is often a good approach. Just post your 4 lines within <code>...</code> blocks and we can tell exactly what is going on.