- foreach line $linenum - Compare the number of records returned by "SELECT * WHERE LINENUM=$linenum" to the number of records returned by "SELECT DISTINCT * WHERE LINENUM=$linenum". If they're different, there are duplicate records. - end