my @array = ('11','54','23','78','54','54','78'); my %hash; foreach $thing (@array){ #increment it in case for some reason you later want a # count of how many each are in the orig array $hash{$thing}++; } my @unique = keys %hash;