A Perl idiom for removing duplicate values from an array: @uniq = keys %{{map{$_=>1}@list}} Is it cheaper to use this version: