- or download this
sub uniq {
my %hash = map { $_ => 1 } @_;
return keys %hash;
}
- or download this
sub uniq {
return keys map { $_ => 1 } @_;
}
- or download this
sub uniq {
# two pairs of braces around map
return keys %{ { map { $_ => 1 } @_ } };
}
- or download this
sub uniq {
# single pair of braces around map
return keys %{ map { $_ => 1 } @_ };
}