in reply to Re^2: my code works just fine, but how :D
in thread my code works just fine, but how :D

Simpler yet:

$ uniq -d <inputfile

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.