P is for Practical | |
PerlMonks |
Re: Remove Duplicates!! Please Helpby jbert (Priest) |
on Jan 03, 2008 at 15:42 UTC ( [id://660224]=note: print w/replies, xml ) | Need Help?? |
If the lines are adjacent the unix tool 'uniq' does this job:
If they're not adjacent, you can sort the file first (unless, as the line endings suggest, there is other structure to the file such as an HTML or XML header). This is so useful that sort has it as an option (-u), so you don't need to pipe to uniq:
In Section
Seekers of Perl Wisdom
|
|