in reply to output unique lines only

What parts are you having trouble with?

Update: I deliberately didn't give any code as I don't like to help people who show no sign of putting any effort in for themselves. It seems that others don't agree with that policy.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg