Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Remove Duplicates!! Please Help

by kirillm (Friar)
on Jan 03, 2008 at 15:37 UTC ( #660217=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -lnae 'print unless $seen{$F[0]}++' < file2.txt > file1.txt
    
  2. or download this
    $ perl -MTie::Hash::Indexed -lane '\
      sub BEGIN {tie %seen, "Tie::Hash::Indexed"};\
      sub END {print $seen{$_} for keys %seen};\
      $seen{$F[0]} = $_'  file2.txt > file1.txt
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-10-06 14:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (26 votes). Check out past polls.

    Notices?