Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Remove Duplicates!! Please Help

by NetWallah (Canon)
on Jan 03, 2008 at 16:16 UTC ( [id://660238]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://660238]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-25 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found