```{index} single: uniqstr; List::Util function ``` ```{index} single: List::Util::uniqstr; Perl function ``` # uniqstr Remove subsequent duplicates by string equality, treating `undef` as the empty string. ## Synopsis ```perl my @subset = uniqstr @values; my $count = uniqstr @values; # scalar context - count only ``` ## What you get back In list context, the unique elements in first-seen order; in scalar context, their count. Unlike `uniq`, an `undef` element is indistinguishable from `""` and comes back as `""`. ## See also - `uniq` - identical, except `undef` is kept as `undef`. - `uniqnum` / `uniqint` - numerical comparisons.