in reply to Find the shortest word in the English Language with: a b c d e f
TIMTOWTDI :-)
next unless/(?=.*a)(?=.*b)(?=.*c)(?=.*d)(?=.*e)(?=.*f)/i;push@_,$_ # ==> lc=~s/(.)(?=.*\1)//gr=~y/abcdef//<6||push@_,$_ # or, on Perls <5.14: ($b=lc)=~s/(.)(?=.*\1)//g;$b=~y/abcdef//<6||push@_,$_
Update: s/tr/y/, thanks Eily :-)
|
|---|