in reply to Removing Duplicate Lines from a File

Hi !

The uniq command expects sorted input, so you should do sort file | uniq, or, better: sort -u file

as to how to use DamnDirtyApes answer in your script:
while (<>) { unless ($n{$_}++) { ... do something whith the line ... } }

---- amphiplex