in reply to Count the Duplicate Entries and make them uniq

Why are you trying to do a unique count in Perl instead of using SQL to do that? See SQL count and/or SQL count distinct.

Also, SQL has the DISTINCT keyword if you need to find the unique values for a column. See SQL DISTINCT.

Also see perlfaq4 on "duplicate" on how to find/remove duplicates.