Since your time frame is very very less, and presumably this isn't homework that has to be done in Perl, you might want to avoid reinventing the wheel (utilities available in any *nix system including Cygwin):
sort file.txt | uniq -d > duplicates.txt
Aaron B.
Available for small or large Perl jobs; see my home node.
In reply to Re: Remove Duplicates from one text file and print them in another text file.
by aaron_baugher
in thread Remove Duplicates from one text file and print them in another text file.
by bedohave9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |