in reply to Removing duplicate lines from a file

The Module List::MoreUtils has a uniq method that does what it sounds like you want.

G. Wade