@U = keys ('A'=>1,'B'=>2,'Z'=>26);
That's the same as getting every second item (starting with the first) and removing duplicates. There's no good shorthand for that, even if you omit the requirement to remove duplicates.
@U = keys %{{ map { $_=>1} @NU }};
If the contents of @NU has no duplicates, then that's the same as
my @U = @NU;
If your question is how to remove duplicates, then there's an answer in perlfaq4. Some solutions
my @U = uniq @NU; # From List::Util
I use the idiomatic
my %seen;
my @U = grep !$seen{$_}++, @NU;
|