dcb0127 has asked for the wisdom of the Perl Monks concerning the following question:
I have this database (1MB) that I know has duplicate lines. The database layout is ID,NAME,ADDRESS,EMAIL
How do I sort it remove duplicates and have it print out into a new file.
#!/usr/bin/perl -w open(INF,"db.txt"); @data = <INF>; close(INF); @sd = sort(@data); ...what do I use to remove duplicates... open(OUTF,">outdb.txt"); print OUTF; close(OUTF);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Remove Duplicate Lines
by perrin (Chancellor) on Sep 18, 2002 at 18:57 UTC | |
Re: Remove Duplicate Lines
by rbc (Curate) on Sep 18, 2002 at 19:01 UTC | |
Re: Remove Duplicate Lines
by BrowserUk (Patriarch) on Sep 18, 2002 at 21:45 UTC | |
Re: Remove Duplicate Lines
by tstock (Curate) on Sep 18, 2002 at 19:01 UTC | |
Re: Remove Duplicate Lines
by fglock (Vicar) on Sep 18, 2002 at 19:04 UTC | |
by Aristotle (Chancellor) on Sep 18, 2002 at 19:38 UTC | |
Re: Remove Duplicate Lines
by Anonymous Monk on Aug 01, 2019 at 14:36 UTC | |
by afoken (Chancellor) on Aug 01, 2019 at 19:47 UTC |
Back to
Seekers of Perl Wisdom