in reply to (almost) Unique elements of an array

Here's a solution that keeps retains the original order and the original case. Basically, it removes any later occurrences, regardless of case, but keeps the case of the original.
print join ", ", unique_case(qw( THIS This That That ThAT ThAt ThAt THIS These Those )); sub unique_case { my %seen; return grep {!$seen{uc $_}++} @_; }