laziness, impatience, and hubris | |
PerlMonks |
Re: Remove duplicate data from text fileby mirod (Canon) |
on Nov 28, 2001 at 00:24 UTC ( [id://127897]=note: print w/replies, xml ) | Need Help?? |
If you are on unix and don't care about the order of the output (or want it sorted): sort -u <file> is your friend. Otherwise you can try: perl -n -e 'print unless $seen{$_}++;' <file>
In Section
Seekers of Perl Wisdom
|
|