@array = qw(1 2 3 4 5 5); $hash = { map { $_ => 1 } @array }; my @sorted_unique_values = sort keys %$hash;