Update5: Thanks larryk for the suggestion, 77 now
sub Z{ @_=@l=sort{.5<=>rand}@_;join('',reverse@l)eq(join'',map{map{chop}@l}@l +)?@_:&Z }

Update4: Okay, last update, sorry (87 now)

sub Z{ @_=@l=map{splice@_,rand@_,1}@_;join('',reverse@l)eq(join'',map{map{cho +p}@l}@l)?@_:Z(@_) }

Update3:Okay, so I'm bad at golf :-) (now at 98)

sub Z{ for(;;){@_=@l=map{splice@_,rand@_,1}@_;return@_ if join('',reverse@l)e +q join'',map{map{chop}@l}@l} }

Update2: Using for(;;) instead of while(1) -- count = 101;

sub Z{ for(;;){@l=map{splice@_,rand@_,1}@_;@_=@l;return@_ if join('',reverse@ +l)eq join'',map{map{chop}@l}@l} }

Original:

Hello

Here is my shot at 102 using permutation trial and error, enjoy

my @ar = qw/NEAR LANE EARS AREA/ ; # @ar = qw/LINGO MILLS SMOCK IDIOM LOGIC/; print "$_\n" for Z(@ar); sub Z{ while(1){@l=map{splice@_,rand@_,1}@_;@_=@l;return@_ if join('',reverse +@l)eq join'',map{map{chop}@l}@l} }

Aziz,,,

Update: Added Mills Lingo :-)


In reply to Re: (Golf) Word squares by abstracts
in thread (Golf) Word squares by japhy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.