Help for this page
my @string = qw(a a a a b b b c d e f q q q r r r); my @singletons = uniq(@string);
uniq LIST Returns a new list by stripping duplicate values in ... number of unique elements in LIST. my @x = uniq 1, 1, 2, 2, 3, 5, 3, 4; # returns 1 2 3 5 4