Oct 26, 2007, 12:26 PM
Post #1 of 2
perl script help needed
i need to write a perl program which does the following:
it connects to the database and retrieves the rows from a table, which i am able to do.
For example, the table looks like this :
Name PID CID LID
a1 0 0 10
a1 0 0 20
a1 0 1 30
a2 0 2 40
a2 1 1 50
a3 0 1 10
so, here i need to check for duplicates and the rule is as folows:
eliminate duplicate rows which has the same CID, same PID and same name.
SO in the above example, i need to eliminate either row 1 or row 2. LID is NOT an issue here, i mean it does not matter if they are same or different.
I am storing all columns in separate arrays and then trying to sort based on columns. I just have an idea but I would like to have the perfect working code.
I will be grateful if some1 could provide me with one.