Answers for "how to get distinct values from an array in perl"

0

unique in perl

use List::MoreUtils qw(uniq);
 
my @words = qw(foo bar baz foo zorg baz);
my @unique_words = uniq @words;
Posted by: Guest on June-27-2020

Code answers related to "how to get distinct values from an array in perl"

Browse Popular Code Answers by Language