http://www.perlmonks.org?node_id=11131486


in reply to extracting only those keys with uniq values in array list

List::Util is core and also exports uniq.
use List::Util qw( uniq );

Or, write your own:

sub uniq { my @values = @_; my %uniq; @uniq{@values} = (); return keys %uniq }

or, if you want to keep the order:

sub uniq { my @values = @_; my %seen; return grep ! $seen{$_}++, @values }

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]