in reply to Uniq list

Or, phrased more diplomatically than morgon chose, please review How do I post a question effectively?. Note that we are here to help you debug your own work, not do it for you. What did you try? What did it do, and how was that different than what you expected?

A very rudimentary filter to only print the first occurrence of a line in an output stream would be piping it through:

perl -nE 'print if not $seen{$_}++'
adapted from perlfaq4's How can I remove duplicate elements from a list or array?.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.