in reply to keys with an expression

This should work in the newer Perls:

my @unique = keys { map { $_ => 1 } @array };