in reply to Find the shortest word in the English Language with: a b c d e f
an interesting question for a bit of golf
Change:
next unless/(?=.*a)(?=.*b)(?=.*c)(?=.*d)(?=.*e)(?=.*f)/i;push@_,$_
To:
/a/i&/b/i&/c/i&/d/i&/e/i&/f/i&&push@_,$_
And you can save one character by using a bareword filehandle.
|
|---|