Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: (Golf) Word squares

by abstracts (Hermit)
on Aug 14, 2001 at 00:05 UTC ( [id://104569]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub Z{
    @_=@l=sort{.5<=>rand}@_;join('',reverse@l)eq(join'',map{map{chop}@l}@l
    +)?@_:&Z
    }
    
  2. or download this
    sub Z{
    @_=@l=map{splice@_,rand@_,1}@_;join('',reverse@l)eq(join'',map{map{cho
    +p}@l}@l)?@_:Z(@_)
    }
    
  3. or download this
    sub Z{
    for(;;){@_=@l=map{splice@_,rand@_,1}@_;return@_ if join('',reverse@l)e
    +q join'',map{map{chop}@l}@l}
    }
    
  4. or download this
    sub Z{
    for(;;){@l=map{splice@_,rand@_,1}@_;@_=@l;return@_ if join('',reverse@
    +l)eq join'',map{map{chop}@l}@l}
    }
    
  5. or download this
    my @ar = qw/NEAR LANE EARS AREA/ ;
    # @ar = qw/LINGO MILLS SMOCK IDIOM LOGIC/;
    
    ...
    sub Z{
    while(1){@l=map{splice@_,rand@_,1}@_;@_=@l;return@_ if join('',reverse
    +@l)eq join'',map{map{chop}@l}@l}
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-24 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found