in reply to duplicate records in a csv file

sanju7:

You could've put your data files in code tags as well, I think it would help clarify your post a little. Also, you may want to fix your indentation so that the code is easy to read. I was going to take a look at the code, but since the indentation doesn't show the program structure, I can't really read it unless I bother to download the code and reformat it. Considering it's my day off, I'm not inclined to go the extra mile.

Anyway, a couple of notes:

  1. Putting the key information in a hash will let you detect duplicate lines.
  2. You can easily open multiple files and print the records to different files to split your records out.

If I notice that the node is easier to read, or if you have any questions about what I wrote, I'll be happy to revisit the node and see if there's anything more I can offer.

...roboticus

Replies are listed 'Best First'.
Re^2: duplicate records in a csv file
by sanju7 (Acolyte) on Jul 01, 2010 at 09:24 UTC
    That was my lack of proper care while writing down. Reformatted indented now.