Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Eily (Monsignor)
on Jul 04, 2018 at 08:48 UTC ( [id://1217866]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open$:,"</usr/share/dict/words";while(<$:>){...}
    @ARGV="/usr/share/dict/words";while(<>){...}
    
  2. or download this
    $a='a';$a++while/$a/;push@_,$_ if$a gt'f'
    next unless/(?=.*a)(?=.*b)(?=.*c)(?=.*d)(?=.*e)(?=.*f)/i;push@_,$_
    
  3. or download this
    @ARGV="/usr/share/dict/words";while(<>){$a='a';$a++while/$a/i;push@{$_
    +[length]},$_ if$a gt'f'}@_=map{$_?@$_:()}@_
    open$:,"</usr/share/dict/words";while(<$:>){next unless/(?=.*a)(?=.*b)
    +(?=.*c)(?=.*d)(?=.*e)(?=.*f)/i;push@_,$_}@_=sort{length$a<=>length$b}
    +@_
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found