in reply to quandery about a grep statement
That could be compacted further, but I'm lazy and I don't want to overwhelm people (yeah, that's it).my %hash; @hash{@values} = (); my @sorted_uniq = sort keys %hash;
Depending on how well sorted @values is, this could be more expensive than a simple for loop without grep or map.
|
|---|