List::Uniq extracts the unique elements of a list. This is a commonly re-written (or at least re-looked-up) idiom in Perl programs. WWW: https://metacpan.org/release/List-Uniq