http://qs321.pair.com?node_id=660238


in reply to Re: Remove Duplicates!! Please Help
in thread Remove Duplicates!! Please Help

Marginally less overhead if the data is sorted:
perl -lane 'print unless $F[0] eq $prev;$prev=$F[0]' < file2.txt > fi +le1.txt
Also, the OP's code handles the boundary condition for the first record, but not the last.

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom