in reply to Re (tilly) 4: GOLF challenge: destroy dup array elements
in thread GOLF challenge: destroy dup array elements

Yes, overload can break this, and yes, I am willing to forget about that. However, my solution treats undef() and "" as the same item, returning only one of them if given both -- which is perhaps not too good ...

Likewise, if the parameter list contains both a (well-behaved) ref and the stringified version of that ref, my sub will return only one of them. These problems are easily fixed, though the new sub loses some of those golf-like qualities -- it's not quite as neat:

sub x{ values%{{map{(ref$_?1:defined$_?2:3).$_,$_}@_}} }

The Sidhekin, wilfully ignoring overload