http://www.perlmonks.org?node_id=84778


in reply to Re: PGA Golf, Round 1 - Results
in thread PGA Golf, Round 1 - Results

Agreed. 22 is the best that I have.

For a bit I mistakenly thought I had a 20 char solution in the form of:

sub hole{map/^(.*?)\1+\z/s,@_}
but the rules say that if a single thing is returned, then it will be in scalar context. In scalar context this solution is wrong (as I indicated in an "oops" update).