use Array::Uniq; my @list = qw/ Tomate Kartoffel Kartoffel Tomate rote Paprika Blumenkohl Tomate /; print join("\n", distinct(sort(@list))), "\n";