in reply to keys with an expression
I don't know if that worked before, but I do find the error message okay, as
returns a list, not an array, which "keys" would also accept as a valid argument.(map { $_ => 1 } @array)
You get the same error if you try:
but not with:my @unique = keys (1,1,2,3,2,2);
which returns the indices of the array.my @unique = keys @array;
In Section
Seekers of Perl Wisdom