http://qs321.pair.com?node_id=1063540


in reply to keys with an expression

I don't know if that worked before, but I do find the error message okay, as
(map { $_ => 1 } @array)
returns a list, not an array, which "keys" would also accept as a valid argument.

You get the same error if you try:

my @unique = keys (1,1,2,3,2,2);

but not with:
my @unique = keys @array;
which returns the indices of the array.