use strict; use Set::Scalar; use Data::Dumper; my @items = ('this', 'that', 'that', 'those', 'these', 'them', 'thou'); my $set = Set::Scalar->new(@items); print Dumper($set->members); __END__ $VAR1 = 'those'; $VAR2 = 'these'; $VAR3 = 'thou'; $VAR4 = 'them'; $VAR5 = 'that'; $VAR6 = 'this';