in reply to Using unix commands in perl?

You could also have used List::MoreUtils' uniq function.