Abigail wrote:
> Of course, all entries using -F// are fishy:
>
> Here's one without any regexes:
>
>    perl -nle'$x=$:=$_;map$$x{chop$:}=1,0..9;keys%$x>9&10==y&&&c&&print'
words
>
> Abigail

I agree that g/./ and -F// are fishy; that was an oversight by me.
Thanks for the tip using chop. I have improved the golf score
a little, though I feel sure further improvement is possible:

perl -nle'$x=$:=$_;map$$x{chop$:}=1,0..9;keys%$x>9&10==y&&&c&&print' words
perl -ne'$y=$_;my%y;$y{chop$y}=1while$y;121- y&&&c*keys%y||print' words

I looked three times at your y&&&c before I figured it out!
It inspired me to add another artistic solution, this time
with a "|" theme:

perl -ne 'y|||c-11|m|(.).*\1|||print' words

Andrew.

Reply via email to