Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Find the shortest word in the English Language with: a b c d e f

by jwkrahn (Abbot)
on Jul 04, 2018 at 03:00 UTC ( [id://1217850]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1217850]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-25 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found