Put in a hash or AoA, check for duplicity, flag it. Print out the hash/aoa [download]
In reply to Re^2: Parsing problem by imrags in thread Parsing problem by bluedevil