Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Remove duplicate entries

by ikegami (Pope)
on Nov 16, 2010 at 23:37 UTC ( #871867=note: print w/replies, xml ) Need Help??


in reply to Remove duplicate entries

Normalise the key (remove the junk characters) and use it as a hash key.
my %seen; while (<>) { my @fields = ...; my $key = normalise($fields[0]); print { $seen{$key}++ ? $unique_fh : $extras_fh } $_; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://871867]
help
Chatterbox?
[SuicideJunkie]: Parse a serial number from a register. But it is humans that type it in originally.
[SuicideJunkie]: No respect for buffer sizes... give them a byte, they take three :D

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2016-12-07 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (131 votes). Check out past polls.