Perl Christmas Quiz

Peter Corlett abuse at
Fri Dec 12 17:38:55 GMT 2008

On Fri, Dec 12, 2008 at 12:29:24PM -0500, Uri Guttman wrote:
> return keys%{{map{$_,1}grep(${{map{$_=>1}@{$_[0]}}}{$_},@{$_[1]})}} ;

> it may not win in golf but it is a single expression/statement with no
> declared variables so that should earn some points. i wouldn't call
> multistatement code a true one liner. :)

You can save an easy eight strokes by dropping the "return ", of course.

I particularly admire some of the evil deviousness I've seen in this round
of golf. The one using a regex and chop is my favourite.

More information about the mailing list